Showing results for 
Search instead for 
Did you mean: 
Frequent Visitor

DAX equivalent of Toppercent

Hi there,


I appreciate this probably doesn't exist but you never know.


All of the DAX workrounds I've seen are really cumbersome for returning the set of customers/items that contribute 80% of sales .


MDX has the v simple filter "topPercent([Customers].[Group Name].[All].Children,80,[Measures].[Gross Margin])".


I can use that in SSRS or PBI Report Server but not Power BI desktop/web service.


Any brilliant ideas appreciated!





Community Support
Community Support



You may take a look at Quick measure Running total and Visual level filters.

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thanks all - my solution was made all the more complicated by using a direct query SSAS model which I didn't want any more complicated than it already is.


I ended up using a TOPN filter in Power BI desktop where I could get away with it - and then where essential using SSRS and an MDX hack.


Would be nice if the filters in Desktop could have top N percent as well as top N but I'm not going to die in a ditch over it.

Solution Sage
Solution Sage

Take a look at this:



Did I answer your question correctly? Mark my answer as a solution!

Proud to be a Datanaut!  

OK - had another bash at all the segmentation etc patterns that they suggest, all a bit clunky for me. Shall probably go back to the data model and just do it in SQL...


Thanks anyway.



Thanks for this - Marco and Alberto are the absolute Dons.


I've tried this one before but it wasn't very satisfying. Maybe I'll give it another go...

Helpful resources

UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Power BI October Update 2021.jpg

Power BI Release

Click here to read more about the October 2021 Release!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Teds Dev Camp Oct. 2021 768x460.jpg

Power BI Dev Camp - October 28th, 2021

Mark your calendars and join us for our next Power BI Dev Camp!