Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Trying to get a cumulative sum (and then a cumulative percentage) value into a matrix table, but I am just not able to get the correct calculations. Here are 3 different combinations (amongst the many others that I have tried) as examples:-
Example 1:-
Cumulative Disti Net Sales = CALCULATE( [Disti Net Sales], FILTER ( ALLSELECTED ( 'Sales Data' ), 'Sales Data'[Index] <= MAX ( 'Sales Data'[Index] ) ) )
Example 2
Cumulative Disti Net Sales = CALCULATE( [Disti Net Sales], FILTER ( ALLSELECTED ( 'DateDimension' ), DateDimension[FullDateAlternateKey] <= MAX ( DateDimension[FullDateAlternateKey] ) ) )
Example 3
Cumulative Disti Net Sales = CALCULATE( [Disti Net Sales], FILTER ( ALLSELECTED ( 'Sales Data' ), 'Sales Data'[Ship To Cust Id] <= MAX ( 'Sales Data'[Ship To Cust Id] ) ) )
What am I missing or not doing correctly?
I have successfully created a cumulative measure that maps out sales over time (using the date table & date field), but not sure what I am doing wrong here.
Edit/Addition clarification:-
Disti Net Sales = sum ( 'Sales Data'[Invoice-Doc] )
Solved! Go to Solution.
Hi,
Try these measures
Rank = if([Disti Net Sales] = BLANK(),BLANK(),RANKX(ALL('Sales data'[City]),[Disti Net Sales]))
Cumulative Disti Net sales = SUMX(TOPN([Rank],CALCULATETABLE(VALUES('Sales data'[City]),ALL('Sales data'[City])),[Disti Net Sales]),[Disti Net Sales])
Cumulative Disti Net sales (%) = [Cumulative Disti Net sales]/CALCULATE([Cumulative Disti Net sales],all('Sales data'[City]))
Hope this helps.
Hi @Ashish_Mathur ,
Thank you for the measures. The cumulative % measure was not working, but I edited it to :-
Cumulative Disti Net Sales % = DIVIDE( [Cumulative Disti Net Sales] , CALCULATE(SUM('Sales Data'[Invoice-Doc]), ALL('Sales Data'[City])) , BLANK() )
And it's showing the cumulative percentages now.
Hi,
Try these measures
Rank = if([Disti Net Sales] = BLANK(),BLANK(),RANKX(ALL('Sales data'[City]),[Disti Net Sales]))
Cumulative Disti Net sales = SUMX(TOPN([Rank],CALCULATETABLE(VALUES('Sales data'[City]),ALL('Sales data'[City])),[Disti Net Sales]),[Disti Net Sales])
Cumulative Disti Net sales (%) = [Cumulative Disti Net sales]/CALCULATE([Cumulative Disti Net sales],all('Sales data'[City]))
Hope this helps.
Hi @Ashish_Mathur ,
Thank you for the measures. The cumulative % measure was not working, but I edited it to :-
Cumulative Disti Net Sales % = DIVIDE( [Cumulative Disti Net Sales] , CALCULATE(SUM('Sales Data'[Invoice-Doc]), ALL('Sales Data'[City])) , BLANK() )
And it's showing the cumulative percentages now.
You are welcome.
Bumping up to see if anyone has any thoughts or ideas. Thank you.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
111 | |
95 | |
80 | |
68 | |
59 |
User | Count |
---|---|
150 | |
119 | |
104 | |
87 | |
67 |