Forum Discussion
BIanon
3 years agoHelper V
Calculating incremental contribution
Hello Community, I have a case which to me is pretty tricky to get started on. I will explain the scenario and then finish off with some of my own thoughts on how to structure this. Scenario: ...
Anonymous
3 years agoNot applicable
HI ,try below steps:
- Create a measure to calculate the cumulative sales amount for each product:DAXCumulative Sales = CALCULATE(SUM(Sales[Amount]), FILTER(ALLSELECTED(Products), Products[ProductID] <= MAX(Products[ProductID])))
This measure calculates the cumulative sales amount by summing the sales amount for all products up to the current product based on their ProductID.
- Create a measure to calculate the unique contribution to sales for each product:DAXUnique Contribution = [Cumulative Sales] - CALCULATE(SUM(Sales[Amount]), FILTER(ALLSELECTED(Products), Products[ProductID] < MAX(Products[ProductID])))
This measure subtracts the sales amount of the previous products from the cumulative sales amount to calculate the unique contribution.
- Create a measure to calculate the unique contribution to sales for each product:
- BIanon3 years agoHelper V
Hello and thank you for your reply.
I am currently testing out your method but am experincing that the sum is cumulative across the alphabetical order of my ProductID's (These are unfortunately text strings).
I need the cumulative sum to start from the product with the highest sales amount and then move down in rank. Is this achieveable ?
will also continue to see if i can solve it myself