Forum Discussion
eyeball
9 years agoFrequent Visitor
Using Rank in a table
Hi, I'm trying to get to grips with the RANK function but I seem to be having a bit of trouble getting it to work. I have a table that stores opportunities for both contacts and companies and I wou...
Sean
9 years agoCommunity Champion
How about this...
Rank Measure =
IF (
HASONEVALUE ( 'Table'[accountid] ),
IF (
ISBLANK ( MIN ( 'Table'[accountid] ) ),
BLANK (),
RANKX (
FILTER ( ALL ( 'Table' ), 'Table'[accountid] <> BLANK () ),
CALCULATE ( SUM ( 'Table'[value] ) )
)
)
)Here's the result...
Good Luck! :smileyhappy:
EDIT: Vvelarde's IF (... below takes care of the text format eyeball
(the Rank itself remains the same just the condition is changed)
eyeball
9 years agoFrequent Visitor
Hi Sean,
Many Thanks for this, it looks good! The only problem I've got now is that the Id is actually a guid (sorry, should have mentioned that) so the min function is seeing it as a string...