0
votes

I am new in Power bi. I have a table where I have agents details. I have their scores as well. I have date wise data into table where the following columns are available - Raw Data

I have created created measure for Average of Score where Metric is UES AGGREGATE -

Report Preview

I have to get the ranking of the advocate(s) for the Average Score (UES AGG). I have tried this measure for Ranking calculation -

Rank_UES = RANKX('RankSummary',[RKS_UESAGG])

I am getting wrong ranking. Please help me , how to solve the issue.

Thanking You.

1
Note : The Advocate Name used into slicer. So, it can be selected. When they are selected. I have to show the ranking for selected agents. - Mind Hunter

1 Answers

1
votes

Use ALL function with RANKX.

Rank_UES  =
RANKX (
    ALL ( 'RankSummary'[AgentfullName] ),
    [RKS_UESAGG]
)

I do not know if your [RKS_UESAGG] get you what you want. Suppose you want average sales you make something like this:

Rank_UES =
RANKX (
    ALL ( 'RankSummary'[AgentfullName] ),
    AVERAGE ( 'RankSummary'[Amount] )
)

https://docs.microsoft.com/en-us/dax/rankx-function-dax