问题
Can you explain what is the job of the value
parameter in function RANKX? I could not figure out from documentation what it is for:-)
RANKX(<table>, <expression>[, <value>[, <order>[, <ties>]]])
Possibly, if you could submit an example how it works.
回答1:
Let´s say I have to tables. Withhin this tables I can rank the games by their rating. Like this:
I have a rank for the left table
Rank Switch = RANKX(ALLSELECTED('Switch'[Game]); CALCULATE(SUM('Switch'[Rating])))
and one for the right table:
Rank PC = RANKX(ALLSELECTED('PC'[Game]); CALCULATE(SUM(PC[Rating])))
This ranks are independent from the other table. But what about the raiting of the left table compared to the raiting of the right table? This is were the value parameter comes to use.
So you see the highest raitings on the right table are just on second place because of Breath of the Wild
in the left table.
来源:https://stackoverflow.com/questions/59093139/the-value-parameter-in-dax-function-rankx