Forum Discussion
Calculating incremental contribution
hi BIanon ,
check below measures
Product Rank = RANKX(ALL('YourTable'[ProductID]), SUM('YourTable'[SalesAmount]), , DESC, Skip)
or
Cumulative Sales = SUMX( FILTER( ALL('YourTable'), 'YourTable'[Product Rank] <= EARLIER('YourTable'[Product Rank]) ), 'YourTable'[SalesAmount] )
Please Accept as Solution If resolved your problem!!!
- BIanon3 years agoHelper V
Thank you once again.
The [Product Rank] measure, would that have to be a calculated column?- Anonymous3 years agoNot applicable
HI BIanon ,
yes try with calculated column
- BIanon3 years agoHelper V
Hello again,
I tried adding the ranking to my dimension via my DW as the calc. col was too much to run on my model.
The problem is, doing it this way removes the ability to slice on time since the value i am ranking on needs to change as the user moves the time slicer.
I can rank dynamically, but I can't find a way to then work with those rankings since EARLIER() only accepts a col ref
Do you have an idea for this?
Also, thank you so far for your time and knowledge
- BIanon3 years agoHelper V
Hello again,
I have tried implementing your pattern but doing the first measure as a calculated column completely crashed my client so I had to add it to the table in my DW.
Now I'm trying to implement your second measure but it suddenly hit me; doing static ranking like this doesn't support filtering on time, does it ?
Filtering on something like category is fine because a product can only belong to one category but when my users start changing time, the value and thus ranking change?
There HAS to be a way to work with rankings in PBI that is dynamic ?