Note |
---|
The percent function is only available for PhixFlow instances running on an Oracle database. |
This function can be applied to a numeric field, to return the percentage of the sum of values for each key value in relation to the total sum of values.
You should use this function in conjunction with one or more grouping attributes - each combination of values from these grouping attributes gives a key value.
For example, you have a table with 2 fields:
Number | Label |
---|
12 | A |
14 | B |
13 | C |
10 | A |
5 | A |
2 | B |
and you create a grid view:
- dragging in the attribute
Label
- which automatically becomes a grouping attribute when one or more of the other attributes are aggregated - dragging in the attribute
Number
, and applying the aggregate function Percent - setting the rounding on the view attribute
Number
to 2 decimal places
This will give the view:
Number | Label |
---|
48.22 | A |
28.57 | B |
23.21 | C |