Forum Discussion
Next Top 5 Ranked
- Anonymous1 year ago
Hi PowerBIFan5 ,
As per your earlier post, you need to use the slicer as the basis for your selection, and if you don't want to enter it manually you can use hardcoding to specify the range of rankings you need to display.Top5 = IF( Table_1[Rank] > 6 && Table_1[Rank] <= 11, 1, 0 )Similar to the 6, and 11 here.
Best regards,
Albert HeIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi PowerBIFan5 ,
You can try the following steps:
Sample data
Create measure
Rank = RANKX(ALL(Table_1),CALCULATE(SUM(Table_1[Value])),,ASC,Dense)
Create a calculate table(There are thirteen pieces of test data above, if you have duplicates, based on your largest
RANK value)
SlicerTable = GENERATESERIES(1, 13, 1)
Create measures
Top5 =
IF(
Table_1[Rank] > SELECTEDVALUE(SlicerTable[Value]) && Table_1[Rank] <= SELECTEDVALUE(SlicerTable[Value]) + 5,
1,
0
)Rank+1 =
CALCULATE(
MAX(Table_1[Nmae]),
FILTER(
Table_1,
Table_1[Rank] = SELECTEDVALUE(SlicerTable[Value]) +1
)
)Rank+2 =
CALCULATE(
MAX(Table_1[Nmae]),
FILTER(
Table_1,
Table_1[Rank] = SELECTEDVALUE(SlicerTable[Value]) +2
)
)
Apply the Top5 to table filter
Final output
Best regards,
Albert He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
- PowerBIFan51 year agoFrequent Visitor
Hi Albert, Thank you for taking the time to send over this method! Would I always have to input the value into the slicer manually or is there a way to make the slicer value dynamic based on the selected item's rank?
- Anonymous1 year agoNot applicable
Hi PowerBIFan5 ,
As per your earlier post, you need to use the slicer as the basis for your selection, and if you don't want to enter it manually you can use hardcoding to specify the range of rankings you need to display.Top5 = IF( Table_1[Rank] > 6 && Table_1[Rank] <= 11, 1, 0 )Similar to the 6, and 11 here.
Best regards,
Albert HeIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly
- PowerBIFan51 year agoFrequent Visitor
Hi Albert, Thank you for taking the time to explain - makes sense. I needed something that would be dynamic since the selected item rank will change depending on what's selected. I ended up solving the issue using a duplicate fact table.