DAX code
Top N as % of Total =
VAR N = 5
VAR TopItems = TOPN(N, ALLSELECTED('Product'[ProductName]), [Total Sales])
VAR TopSales = CALCULATE([Total Sales], TopItems)
RETURN
DIVIDE(TopSales, CALCULATE([Total Sales], ALLSELECTED('Product')))
Expresses the combined sales of the top N items as a percentage of overall sales.
Type your table and column names once. Every measure below updates.
Top N as % of Total =
VAR N = 5
VAR TopItems = TOPN(N, ALLSELECTED('Product'[ProductName]), [Total Sales])
VAR TopSales = CALCULATE([Total Sales], TopItems)
RETURN
DIVIDE(TopSales, CALCULATE([Total Sales], ALLSELECTED('Product')))
Replace N with a What-If parameter to make it slicer-driven.
Browse all 175 measures in the Power BI DAX Measures Library, or search the library for something similar to Top N as % of Total.