Percent of Total


The Percent of Total function returns the percentage of each value in the input series out of the total sum of the values in the input series.

The Percent of Total Group function can be optionally used to return the percentage of each value out of the total sum of its group, where the values are grouped by the specified hierarchies.

1. Syntax

Percent of Total:

PERCENTTOTAL(d0, Alignments..)

Percent of Total Group:

PERCENTTOTALGROUP(d0, Alignments..) 

2. Input

The Percent of Total functions require the following input series:

  • d0 - The set of data values for which the formula is calculated.

3. Parameters

The Percent of Total functions accept the following parameters:

  • Alignments... (One or More, Optional) – Hierarchy placeholders to be used as the alignment axis.
    • For PERCENTTOTAL, specifying a hierarchy calculates the percentage for each of its corresponding values out of their total separately each time those hierarchy values occur: e.g., PERCENTTOTAL($Measure$, $Year$) can calculate the percentage for each year out of the total within each Country group.
    • For PERCENTTOTALGROUP, specify the hierarchies by which to group the input values and calculate the percentages of the totals within each group: e.g., PERCENTTOTAL($Measure$, $Country$) will calculate the percentage each value represents out of each country's total.

4. Output

The Percent of Total functions generate the following output:

  • Percent of Total - The Percent of Total result set consisting of values between 0-1 (inclusive) assuming positive input values, representing each input value's percentage of the total. 

4.1. Example

As an example, the figure below shows the initial result of applying the Percent of Total function to a bar chart displaying sales figures for each country, visualized initially as a second bar chart series:

Add the formula
Add the formula

The formula's output is a percentage, which is not useful for comparison against the same chart axis as the original measure that uses a currency as its unit. You can click to remove this formula from the second series from the Data Analysis Panel's Visualization tab, or remove the second series from the chart's properties in the Properties window.

A common example of how to use this formula's output is to display the percentages as labels next to each data point or in tooltips. You can add the formula under Data Point Label in the Data Analysis Panel's Visualization tab, or in the properties for the first chart series, as shown as examples in the article Setting up the visualization.

Showing Percent of Total as labels
Showing Percent of Total as labels

5. See also

Dundas Data Visualization, Inc.
400-15 Gervais Drive
Toronto, ON, Canada
M3C 1Y8

North America: 1.800.463.1492
International: 1.416.467.5100

Dundas Support Hours:
Phone: 9am-6pm, ET, Mon-Fri
Email: 7am-6pm, ET, Mon-Fri