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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

Finding Top or Bottom N Percent using DAX

Hi, 

I am trying to obtain the top n percent of customers such as the example given in 

https://www.burningsuit.co.uk/blog/2019/05/find-top-or-bottom-n-percent-dax/

 

However, I can't do it with my own file with the top/bottom percent. Please kindly help 

 

emerald_silver_1-1610502456676.png

 

 

1 REPLY 1
amitchandak
Super User
Super User

@Anonymous , if you are looking for TOPN or bottomN, then you need to have formula like

Top Rank = CALCULATE([Total Trans Amount],TOPN(selectedvalue(TopBottom[TopBottom]),all(Table[Customer]),[Sales],DESC),VALUES(Table[Customer]))

 

Example - https://community.powerbi.com/t5/Community-Blog/Dynamic-TopN-made-easy-with-What-If-Parameter/ba-p/367415

 

If you need Top percent

https://blog.enterprisedna.co/implementing-80-20-logic-in-your-power-bi-analysis/
https://forum.enterprisedna.co/t/testing-the-pareto-principle-80-20-rule-in-power-bi-w-dax/459
https://finance-bi.com/power-bi-pareto-analysis/

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.