Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
Hi
I have Product Code, Sales Volume Privot report with Sales volumes posted against each SKU across 12 months till Last month. I have to generate running totals at Product code level, calculate each Product code % of Sale, Cumulative % sale to decide ABC analysis for Product code. I unpivot the months and changed into tabular column. And used the 'Table' visual to show the Totals at SKU level. Totals and Average showed correct results. I want to use the 'Quick Measure' or 'New measure' to calculate 'Cumulative Total Sale' and 'Cumulative Sale %' after sorting the Sales Volume column from highest sales to least. It is easy in Excel but couldn't get the same values in Power BI. I am posting the sample Excel sheet and the expected results in excel and also attaching my PowerBI file.
Any help is greatly appreciated.
PBIX file on One drive:
https://1drv.ms/u/s!Anl_FYPHVeK9bfgygTQSDGmlA1Y
Thanks
Prasad
Solved! Go to Solution.
And here is the measure for Cumulative %age
Cumulative_%age = CumulativeBI[Cumulative_Total] / CALCULATE ( SUM ( CumulativeBI[Sales Volume] ), ALL ( CumulativeBI[Product Code] ) )
Hi @Prasad1
Here is the measure for Cumulative Total
Cumulative_Total = VAR Currentsales = SUM ( CumulativeBI[Sales Volume] ) RETURN SUMX ( FILTER ( ALL ( CumulativeBI[Product Code] ), CALCULATE ( SUM ( CumulativeBI[Sales Volume] ) ) >= Currentsales ), CALCULATE ( SUM ( CumulativeBI[Sales Volume] ) ) )
Add above measure in CumulativeBI table
And here is the measure for Cumulative %age
Cumulative_%age = CumulativeBI[Cumulative_Total] / CALCULATE ( SUM ( CumulativeBI[Sales Volume] ), ALL ( CumulativeBI[Product Code] ) )
Hi Zubair Muhammad
Brilliant Solution. Yes. It worked beautifully.
Thank you very much for your help.
Regards
Prasad
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
81 | |
76 | |
61 | |
37 | |
33 |
User | Count |
---|---|
99 | |
56 | |
50 | |
42 | |
40 |