Forum Discussion
shabeercp659
1 year agoRegular Visitor
Detail Table Won't Filter Automatically for Top N, Even When Grand Total is Correct
https://drive.google.com/drive/folders/1B4J-i9eTyTEmBX-c_AZd1OlyzR9gby4W Hello Power BI Community, I am facing a very persistent issue with a Top N report that seems to defy the normal behavior...
- 1 year ago
You need to remove the filters from the ticket id column,
Top Traveler Rank = VAR SelectedN = [Top N Selection Value] VAR TravelerRank = RANKX( ALL(Travelers), CALCULATE([Total Amount], REMOVEFILTERS( Data[Ticket Number] )), , DESC, DENSE ) RETURN TravelerRankYou'd need to do the same thing in the Is Top Traveller measure, and then add [Is Top Traveller] to the detail table as a filter, to only show when the value is 1.
johnt75
Super User
1 year agoYou need to remove the filters from the ticket id column,
Top Traveler Rank =
VAR SelectedN = [Top N Selection Value]
VAR TravelerRank =
RANKX(
ALL(Travelers),
CALCULATE([Total Amount], REMOVEFILTERS( Data[Ticket Number] )),
,
DESC,
DENSE
)
RETURN
TravelerRank
You'd need to do the same thing in the Is Top Traveller measure, and then add [Is Top Traveller] to the detail table as a filter, to only show when the value is 1.
- shabeercp6591 year agoRegular Visitor
Thanks johnt75. This was super helpful!