Percent of group analytic function
This article describes how to use the Percent of Group analytic function in CDP Data Visualization.
-
Click the field on the measurement shelf.In this example, the
sum(population)
field on the Y Axis shelf. -
In the FIELD PROPERTIES menu, expand Analytic
Functions, and select % of Group.
-
In the Analytic Function: Percent of Group modal window:
- In Select aggregate for this measure, leave the default Sum. The other aggregation options are Count, Minimum, Maximum, and Average. In addition, some connection types also support Approximate Distinct Count and Exact Distinct Count.
- Under Select entities over which to calculate percentage, select year. This is the grouping that applies when calculating the percent of group.
- Click APPLY.
- Optional:
If you examine the expression in the Enter/Edit Expression
interface, it shows that the function has the following form:
(sum([population]) / sum(sum([population])) over (partition by [year])) as 'percent(population)'
-
Click REFRESH VISUAL.
You can see the change in the Y axis and tooltips, from displaying the
sum(population)
in millions topopulation
as a percent.