Forum Discussion
c_d_m
2 years agoRegular Visitor
RARNKX duplicating column values and wrong when filtering
I have the follwing model:
and a rank measure which is the following
rankAccumlatdAmount = RANKX(ALL('codeNameTable'[Code]),CALCULATE(SUM('ammountTable'[Ammount])),,DESC,Dense)
Which works fine when im trying to do a simple table
But not okay when i put boath codes in the same table, it duplicates the value of all codes for the same codeFromAmountTable even though boath tables are related
It works wrong when selecting a code (the rank is incorrect)
And the other table as well works wrong when selecting a code
I tried with ALLSELECTED but it didn´t work.
I want the following: when any of the two codes are selected the table returns only the one row with the correctly calculated ranking meaing if with all the codes it ranks 3 the it should still rank 3 when i select the code.
Thanks!