I would like to use the RankX
function (to use the Dense feature for ties) in order to rank the dates in a table per two columns: Fiscal Year
and Entity ID
.
(I guess it may be easier to concatenate the two columns and just sort by that but I'm having issues with my formula still)
Below is my sample data:
My invalid dax formula which returns all 1's is:
Fiscal Purchase Index =
VAR a = 'Purchases'[Purchase_Date]
VAR b = 'Purchases'[Entity_ID]
var c = 'Purchases'[FISCAL_YEAR]
RETURN
CALCULATE (
RANKX ('Purchases', a,,1,Dense ),
FILTER (all('Purchases'),
'Purchases'[Entity_ID] = b &&
'Purchases'[FISCAL_YEAR] = c
)
)
Any help in fixing the rank formula would be very much appreciated. Thank you