Forum Discussion
Group, rank and replace
Morning,
I've attached a sample dataset, There's a few things I need it to be able to do:
-I want to be able to rank them by SALES ORDER
-Once ranked, I want to be able to show the names of the first 5, but anything after that replace with 'Other' and aggregate their number.
-I then need to show the Average failure % for the Top 5 SALES ORDER and Other.
-This needs to be dynamic based on selections e.g. Period.
So I end up with something looking like this (These aren't the correct number)
Thanks
6 Replies
- AnonymousNot applicable
Please provide sample dataset.
- rajendraongole1Super User
Hi Jamie-
as per my understanding, can you please try the below:
Rank_p =
IF (
NOT ISEMPTY ( table ),
RANKX (
CALCULATETABLE (
data,
ALLEXCEPT ( table, table[column] )
),
CALCULATE ( SELECTEDVALUE ( table[column] ) ),,
DESC,
Dense
)
)Regards,
Rajendra
- Jamie-Frequent Visitor
Thanks for trying,
but don't think this is close:
- Jamie-Frequent Visitor
Sample Data
Sorry - Data is here.
Anonymous - Jamie-Frequent Visitor
tried this, but I can't get it working.