Forum Discussion

Gombosf's avatar
Gombosf
New Member
5 years ago
Solved

Issues with RANKX

Dear Members!

 

I have been assigned to build up a database in SharePoint and for the graphical surveys we would use Power BI. have never used this software before so I'm trying to get familiar with it. I'm struggling now with achieving the proper ranking in my document (in the table -name of it is "Table1"- that I've created). I'm just testing this command, because I assume that the usage of this command can be a root cause of a further problem that I'm still facing with.

 

I defined the "Value" variable on my own (I just filled out the variable with random integers) and I had the feeling that the values of the variable need to be converted into a measure variable first ("Value" -> "Total_value").

So I created an other variable ("Total_value") shown below:

Total_value = SUM(Table1[Value])

 

Thus I'd have liked to achieve a proper ranking for the "Total_value" variable. Unfortunately I'm not allowed to upload screenshots of the issue, but I share with you the result of the ranking: 35 (1), 24 (2), 34 (2), 21 (4), 19 (5), 13 (6), 10 (8), 9 (9), 8 (10), 6 (11), .. 

 

As you can see, it's not correct (you can find the ranking order in the brackets -> two values were ranked to the 2nd place and thus the 3rd place is missing, plus the 7th place is missing, too).

I tried to rank the values of the “Total_value” variable as follows:

Ranking_value = RANKX(ALL(Table1), [Total_value])

 

I can summarize the issue in a table-form:

Name

Value

Total_value

Ranking_value

Cx

35

35

1

Ca

24

24

2

Vf

34

34

2

qa

21

21

4

íy

19

19

5

Dsb

13

13

6

Bvx

10

10

8

Bxe

9

9

9

H

8

8

10

W

6

6

11

Nbg

4

4

12

F

3

3

13

V

2

2

14

 

Does anyone have an idea what can be the problem, and could you please help me out?

 

Many thanks.

Regards,

Fruzsina

3 Replies