Selecting and Assigning Column Titles to ACROSS Values

How to:

Reference:

When you use the ACROSS COLUMNS phrase to select and order the columns that display on the report output for an ACROSS sort field, you can assign each selected column a new column title using an AS phrase.


Top of page

x
Syntax: How to Assign Column Titles to ACROSS Values
ACROSS sortfield [AS title]
 COLUMNS aval1 [AS val1title] [{AND|OR} aval2 [AS val2title] [... {AND|OR} avaln [AS valntitle]]]

where:

sortfield

Is the ACROSS field name.

title

Is the title for the ACROSS field name.

AND|OR

Is required to separate the selected ACROSS values. AND and OR are synonyms for this purpose.

aval1, aval2, ... avaln

Are the selected ACROSS values to display on the report output.

val1title, val2title, ...valntitle

Are the column titles for the selected ACROSS values.


Top of page

x
Reference: Usage Notes for Assigning Column Titles to ACROSS Values


Example: Selecting and Assigning Column Titles to ACROSS Values

The following request against the GGSALES data source selects the columns Coffee Grinder, Latte, and Coffee Pot for the ACROSS field PRODUCT, and assigns each of them a new column title.

TABLE FILE GGSALES
SUM
DOLLARS/I8M AS ''
BY REGION
ACROSS PRODUCT  AS 'Products'
  COLUMNS 'Coffee Grinder' AS 'Grinder'
  OR Latte AS 'caffellatte'
  AND 'Coffee Pot' AS 'Carafe'
ON TABLE SET PAGE NOPAGE
END

The output is:

                              Products
Region       Grinder        caffellatte      Carafe
---------------------------------------------------------
Midwest      $666,622       $2,883,566       $599,878
Northeast    $509,200       $2,808,855       $590,780
Southeast    $656,957       $2,637,562       $645,303
West         $603,436       $2,670,405       $613,624

WebFOCUS