Forum Discussion
Anonymous
9 years agoNot applicable
Summarize and Rankx issues
Scenario: I have a poll data with lots and lots of columns. I want to display a pie chart with top 5 (out of aprox 300) items by count of mentions for one specifc column, the rest has to be g...
BetterCallFrank
9 years agoResolver IV
Hi,
you could just try to move the RANKX calculation from a calc. column to a calc measure in the same table.
This will be re-evaluated every time you change a filter/slicer and will therefore always give you the correct results.
Does this help?
Anonymous
9 years agoNot applicable
Hi, seems to be the way to go, but I am having trouble converting this column formula in order to work as a measure:
Top = IF(RANKX(ALLSELECTED(TableTop5),TableTop5[Quantity],,DESC,Skip)<=5,TableTop5[Item],"Others")
Thank you in advance for helping me on this one.
- BetterCallFrank9 years agoResolver IV
Luis, can you upload a PBIX file somewhere?
As for a generic solution the measure could look something like this:
Rank = VAR CurrQty = CALCULATE( SUMX( _Measures, _Measures[Quantity] ) ) RETURN COUNTROWS( FILTER( ALL( DimProduct ), CALCULATE( SUMX( _Measures, _Measures[Quantity] ) ) > CurrQty ) ) + 1