Specifications
CHAPTER 24 DataWindow Expression and InfoMaker Functions
Users Guide 721
Percent
Description Gets the percentage that the current value represents of the total of the values
in the column.
Syntax Percent ( column { FOR range { DISTINCT { expres1 {, expres2 {, ... } } } } } )
Return value
A numeric datatype (decimal, double, integer, long, or real). Returns the
percentage the current row of column represents of the total value of the
column.
Argument Description
column The column for which you want the value of each row expressed as
a percentage of the total of the values of the column. Column can be
the column name or the column number preceded by a pound sign
(#). Column can also be an expression that includes a reference to
the column. The datatype of column must be numeric.
FOR range
(optional)
The data to be included in the percentage. For most presentation
styles, values for range are:
• ALL – (Default) The percentage that the current value represents
of all rows in column.
• GROUP n – The percentage that the current value represents of
rows in column in the specified group. Specify the keyword
GROUP followed by the group number: for example, GROUP 1.
• PAGE – The percentage that the current value represents of the
rows in column on a page.
For Crosstabs, specify CROSSTAB for range:
• CROSSTAB – (Crosstabs only) The percentage that the current
value represents of all rows in column in the crosstab.
For Graph and OLE objects, specify one of the following:
• GRAPH – (Graphs only) The percentage that the current value
represents of values in column in the range specified for the
Rows option.
• OBJECT – (OLE objects only) The percentage that the current
value represents of values in column in the range specified for
the Rows option.
DISTINCT
(optional)
Causes
Percent to consider only the distinct values in column when
determining the percentage. For a value of column, the first row
found with the value is used and other rows that have the same value
are ignored.
expresn
(optional)
One or more expressions that you want to evaluate to determine
distinct rows. Expresn can be the name of a column, a function, or
an expression.