Contribution % of total
Show each row as a percentage of the total of everything the user has selected.
% of Total Sales =
DIVIDE(
[Total Sales],
CALCULATE([Total Sales], ALLSELECTED())
)How it works
The numerator is the sales of the current row. The denominator is the sales for everything still selected after slicers, because ALLSELECTED() removes the filters that come from the rows and columns of the visual but keeps slicer and report filters.
The percentages of all rows therefore add up to 100% of the current selection.
What your model needs
- Total Sales = SUM(Sales[Amount]) (called [Total Sales]). - Any dimension table related to Sales to use on the rows (Region, Product, Date...).
Small example
Input data
Region | Total Sales
North | 600
South | 300
East | 100Expected result
Region | % of Total Sales
North | 60.0%
South | 30.0%
East | 10.0%Common mistakes and limitations
- Using ALL() instead of ALLSELECTED() ignores slicers, so the percentages stop adding up to 100% when a slicer is used. - If you want the share inside a category only, pass the column to ALLSELECTED, for example ALLSELECTED(Product[Product Name]) with Category on the rows above it.