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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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

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

PBI_newuser_0-1687918109335.png

 

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

AugPowerBI_Carousel

Power BI Monthly Update - August 2024

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

August Carousel

Fabric Community Update - August 2024

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