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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
sima_ue031
Helper I
Helper I

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
Super User
Super User

@sima_ue031 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!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.