cancel
Showing results 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

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.

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):

1 ACCEPTED SOLUTION
Super User

Hi,

Please find attached my solution file.

Hope this helps.

Regards,
Ashish Mathur
http://www.ashishmathur.com
5 REPLIES 5
Super User

Hi,

Please find attached my solution file.

Hope this helps.

Regards,
Ashish Mathur
http://www.ashishmathur.com
Post Prodigy

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

Super User

You are welcome.

Regards,
Ashish Mathur
http://www.ashishmathur.com
Super User

@PBI_newuser , Refer if this can help

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

Post Prodigy

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

Announcements

#### 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.

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

#### Power BI Monthly Update - July 2024

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

#### Fabric Community Update - July 2024

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

Top Solution Authors
Top Kudoed Authors
Users online (1,445)