Percent of group analytic function

This article describes how to use the Percent of Group analytic function in CDP Data Visualization.

  1. Click the field on the measurement shelf.
    In this example, the sum(population) field on the Y Axis shelf.
  2. In the FIELD PROPERTIES menu, expand Analytic Functions, and select % of Group.
  3. In the Analytic Function: Percent of Group modal window:
    1. 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.
    2. Under Select entities over which to calculate percentage, select year. This is the grouping that applies when calculating the percent of group.
  4. Click APPLY.
  5. 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)'
    You can see the change in the Y axis and tooltips, from displaying the sum(population) in millions to population as a percent.