I have only ever used RANKX in a calculated column, but now tryin to use it directly as a measure. I have a pivot table with [Deot Name] as row and values is a measure "Data Score". I want to rank the Depots, but excluding Headoffice. I can easily rank every thing using
However I can't work out how to exclude HO from the rankx calculation. My logic says that this should work, but I get the same answer. My logic is the inner CALCULATETABLE creates a table of all depots, then the outer one should exclude "Bristol" from the table before the RANKX is performed.
Any clues why it doesn't work appreciated as seems the filter expression just swamped by the ALL.
Mike
Code:
RANKX(CALCULATETABLE(ALL(Invoices[Depot Name])),[Data Scores],,0,skip)
However I can't work out how to exclude HO from the rankx calculation. My logic says that this should work, but I get the same answer. My logic is the inner CALCULATETABLE creates a table of all depots, then the outer one should exclude "Bristol" from the table before the RANKX is performed.
Code:
=RANKX(CALCULATETABLE(
CALCULATETABLE(ALL(Invoices[Depot Name]),
Filter(Invoices, Invoices[Depot Name]<>"Bristol")
)
),
[Data Scores],,0,skip)
Any clues why it doesn't work appreciated as seems the filter expression just swamped by the ALL.
Mike