Aggregating a Percentage Across a Category

Published: 18 Oct 2016
Last Modified Date: 05 Dec 2019


How to aggregate a percent of total.


Tableau Desktop


A percentage across a category often takes the form of a table calculation with aggregation:
SUM([measure]) / TOTAL(SUM([measure]))

Consequently, it is not possible to aggregate further. To avoid the aggregation issue, rewrite the calculation using Level of Detail Expressions:

{ INCLUDE : SUM( [measure] ) } / { EXCLUDE [category] : SUM( [measure] ) }

Using the above calculation, it is now possible to aggregate. For example, STDEVP() becomes usable.

Additional Information

A calculation using SUM()is already aggregated.

Discuss this article... Feedback Forum
Did this article resolve the issue?