cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Prasad1 Helper I
Helper I

Using Cumulative Sales Total, Cumulative % values

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

 

Cumulative Sum & %.JPG

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User III
Super User III

Re: Using Cumulative Sales Total, Cumulative % values

And here is the measure for Cumulative %age

Cumulative_%age =
CumulativeBI[Cumulative_Total]
    / CALCULATE (
        SUM ( CumulativeBI[Sales Volume] ),
        ALL ( CumulativeBI[Product Code] )
    )
Try my new Power BI game Cross the River

View solution in original post

4 REPLIES 4
Super User III
Super User III

Re: Using Cumulative Sales Total, Cumulative % values

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] ) )
    )
Try my new Power BI game Cross the River
Super User III
Super User III

Re: Using Cumulative Sales Total, Cumulative % values

Add above measure in CumulativeBI table

 

Try my new Power BI game Cross the River
Highlighted
Super User III
Super User III

Re: Using Cumulative Sales Total, Cumulative % values

And here is the measure for Cumulative %age

Cumulative_%age =
CumulativeBI[Cumulative_Total]
    / CALCULATE (
        SUM ( CumulativeBI[Sales Volume] ),
        ALL ( CumulativeBI[Product Code] )
    )
Try my new Power BI game Cross the River

View solution in original post

Prasad1 Helper I
Helper I

Re: Using Cumulative Sales Total, Cumulative % values

Hi Zubair Muhammad

 

Brilliant Solution. Yes. It worked beautifully.

 

Thank you very much for your help.

 

Regards

Prasad

Helpful resources

Announcements
New Ranks Launched March 24th!

New Ranks Launched March 24th!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power BI Community!

‘Better Together’ Contest Finalists Announced!

‘Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

Arun 'Triple A' Event Video, Q&A, and Slides

Arun 'Triple A' Event Video, Q&A, and Slides

Missed the Arun 'Triple A' event or want to revisit it? We've got you covered! Check out the video, Q&A, and slides now.

Join THE global Microsoft Power Platform event series.

Join THE global Power Platform event series.

Attend for two days of expert-led learning and innovation on topics like AI and Analytics, powered by Dynamic Communities.

Community Summit North America

Community Summit North America

Innovate, Collaborate, Grow. The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors