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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Cumulative % for Contribution % of Sales

Hi all,

I am currently stuggling to get the above theory into practice.  I have a data table which needs to show the % Contribution of sales by a customer for the previous 3 years , with the % Change of these contributions also.  So far this has been acheived. Below blacked out as company policy forbid sharing any form of data) 

oli_palmer__0-1603794404770.png

 

I need a 4th column to show us the Cumulative % total so we could easily identify the top 20%,80% of contributions. 

https://community.powerbi.com/t5/Desktop/cumulative-percentages/td-p/571128

I have tried the above method but can;t seem to make it fit my model. Could you possibly advise how is best to do this?

I will drop below the formulas and data tables I am using for the above data. 

 

If you need any further info please let me know 

oli_palmer__1-1603795156879.png

 

 

1 ACCEPTED SOLUTION
MFelix
Super User
Super User

Hi @Anonymous ,

 

The information you have is very reduced I believe you can do it by adding two additional measures to your calculations:

Ranked = RANKX(ALLSELECTED(Customers_Dimension[Customer Name]);CALCULATE([Sales YTD]))

Cumulative % based on Rank = 
           CALCULATE([contribution %];
                     TOPN([Ranked];ALLSELECTED(Customers_Dimension[Customer Name]);[contribution %])
           )

 

Now use the second measure to return your cumulative %.

 

I have made a simulation with a sales database I have and returned the correct result.


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



View solution in original post

1 REPLY 1
MFelix
Super User
Super User

Hi @Anonymous ,

 

The information you have is very reduced I believe you can do it by adding two additional measures to your calculations:

Ranked = RANKX(ALLSELECTED(Customers_Dimension[Customer Name]);CALCULATE([Sales YTD]))

Cumulative % based on Rank = 
           CALCULATE([contribution %];
                     TOPN([Ranked];ALLSELECTED(Customers_Dimension[Customer Name]);[contribution %])
           )

 

Now use the second measure to return your cumulative %.

 

I have made a simulation with a sales database I have and returned the correct result.


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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