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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
PBI_newuser
Post Prodigy
Post Prodigy

how to calculate total cumulative sales in descending order

Hi, how to calculate the cumulative sales for total selected months in descending order by Country, Company and SKU? Below is the sample data.

https://drive.google.com/file/d/1QSxBcandDoIpdo4aA4uAkrIfpC0YNwSY/view?usp=sharing

 

For example, I select Jan to Dec 2023, the cumulative sales should calculate the total sales in descending order.

After calcuting the cumulative sales, I need to categorize the SKU in ABC category. The logic is as below:

  • A: if cumulative % is <= 80%
  • B: if cumulative % is <=90%
  • C: if cumulative % is <=95%
  • D : if cumulative % is <=100%
  • else "Exited"

Expected output (in red):

PBI_newuser_0-1687828406212.png

 

1 ACCEPTED SOLUTION
Ashish_Mathur
Super User
Super User

Hi,

Please find attached my solution file.

Hope this helps.

Untitled.png


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

5 REPLIES 5
Ashish_Mathur
Super User
Super User

Hi,

Please find attached my solution file.

Hope this helps.

Untitled.png


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Hi @Ashish_Mathur , thanks for the solution! It works! 🙂

You are welcome.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
amitchandak
Super User
Super User

@PBI_newuser , Refer if this can help

Power BI ABC Analysis using Window function, Dynamic Segmentation: https://youtu.be/A8mQND2xSR4

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

Hi @amitchandak, I tried this solution but got below error.

PBI_newuser_0-1687918109335.png

 

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

Find out what's new and trending in the Fabric community.