Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
JT-DLPLC
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!

 

Cheers

 

JT

5 REPLIES 5
v-chuncz-msft
Community Support
Community Support

@JT-DLPLC,

 

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.

LivioLanzo
Solution Sage
Solution Sage

Take a look at this: https://www.daxpatterns.com/abc-classification/

 


 


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.

 

J

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

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.