Hi guys,

Hope maybe someone could help me a bit. I am trying to Rank agent based on two indicators: So the most Calls taken, but the least Total Handle time. I was trying sorting but that didnt work either. So i thought Rankx could maybe work. Here is the closest I got to get the result, but it doesnt seem correct either.

Ranking 2 = RANKX(ALL(Sheet2[Agent Name]),RANKX(ALL(Sheet2),

CALCULATE(SUM(Sheet2[Calls])),DESC), RANKX(ALL(Sheet2),

CALCULATE(SUM(Sheet2[Total Handle Time] )),ASC),

DESC, Dense)

I have attached my sample. Any help and advice, i would really appreciate.

Rankx_Sample.pbix (32.7 KB)

Many thanks,

erika

Hi @Jetuke_ES,

There is a relationship between these two indicators, perhaps rank on Avg Time instead…

```
Ranking by Avg Time =
RANKX(
ALLSELECTED(Sheet2[Agent Name]),
DIVIDE(CALCULATE(SUM(Sheet2[Total Handle Time])), CALCULATE(SUM(Sheet2[Calls]))), , ASC, Dense)
```

Another option could be to add a weighing factor to each indicator.

1 Like

Thank you very much Melissa! I tried the avg, yes, that would kinda work. How could i add a weighing factor to indicators? Sorry, have done that one before.

Kind regards,

erika

Hi @Jetuke_ES,

Play around with this.

Here the number of calls counts for 1, the avg time for 2 divide the result by 3, to rank that.

```
Ranking with weight factor =
VAR RankWeight =
RANKX(
ALLSELECTED(Sheet2[Agent Name]),
DIVIDE(
RANKX(
ALLSELECTED(Sheet2[Agent Name]),
CALCULATE(SUM(Sheet2[Calls])), , DESC, Dense) +
RANKX(
ALLSELECTED(Sheet2[Agent Name]),
DIVIDE(CALCULATE(SUM(Sheet2[Total Handle Time])), CALCULATE(SUM(Sheet2[Calls]))), , ASC, Dense) *2
, 3
), , ASC, Dense)
RETURN
RankWeight
```

1 Like

That totally worked!! Thank you so much!!