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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
Anonymous
Not applicable

DAX - calculate number of ItemNo

Hello, 


I have this situation and I need help. 

I have requirments to get a number of items with % of grand total : 

sima_ue031_0-1716062561963.png

 

 

I have an Items with sales. I need to sort sales per item desc. After that i need to calculate % of grand total. (column F) 
After that I need to get Number of ItemNo by % of grand total. 

I need to count number of ItemNo summing % of grand total ( column F ). When I got forexample 50%, i need to count nubmer of items. Forexample summing % from top and after 20 items I got 50% i need to put in 50 % of grand total number of 20 items. After that I need to sum again from top until 75% of grand total, and now i have maybe 37 items.

How i can calculate this? 

1 REPLY 1
Greg_Deckler
Community Champion
Community Champion

@Anonymous Probably need a disconnected table and then a measure that incorporates your logic for what to count. Interesting problem given the need for sorting. Would like to take a closer look but would need sample data posted as text or a link to a sample file.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

Check out the February 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.