Forum Discussion
RANKX issue with some measures
- 8 years ago
AlejandroPCar wrote:
Hi!
I have a problem with RANKX, for one measure works but for others dosent.
I have this table with multiple measures and I need a rank for some ones like this:
I did a rank measure called "Rank Valores" for evaluate the "Valores" column and it works pretty nice. But when I tried to do the same with "Rank Dif I / U" for evalute the "Dif U / I " column it seems like have some troubles with negative values. Is there a way to solve that? Here is my pbix file if it will be necesary: https://1drv.ms/u/s!AtTnrgPUQzQCjX7-2mlyPJQkQX4a
Thanks a lot for your help!
It is a context issue. Try
Rank Dif U/I = VAR Ran = RANKX ( ALLEXCEPT ( Homogenea, Homogenea[nit] ), CALCULATE ( [Dif U / I], ALLEXCEPT ( Homogenea, Homogenea[empresa] ) ), , DESC, DENSE ) RETURN IF ( [ERH V] = 0, BLANK (), Ran ) - 8 years ago
Hi!,
I actually solve the problem, but there is a strange secondary effect like this:
Why the rank ignores the number when it pass from positive to negative? In this case is from 9 to 11, but where is the 10? The formula is
Rank Dif U/I =
VAR Ranking =
RANKX ( ALL( Homogenea[empresa] ); Homogenea[Dif U / I] ; ; 0 ; Dense )
RETURN
IF ( [ERH V] = 0 ; BLANK () ; Ranking )But, like it seems my problem is solved, thank you, this "issue" is really a issue? or this may not affect the result. Thanks!
AlejandroPCar wrote:
Hi!
I have a problem with RANKX, for one measure works but for others dosent.
I have this table with multiple measures and I need a rank for some ones like this:
I did a rank measure called "Rank Valores" for evaluate the "Valores" column and it works pretty nice. But when I tried to do the same with "Rank Dif I / U" for evalute the "Dif U / I " column it seems like have some troubles with negative values. Is there a way to solve that? Here is my pbix file if it will be necesary: https://1drv.ms/u/s!AtTnrgPUQzQCjX7-2mlyPJQkQX4a
Thanks a lot for your help!
It is a context issue. Try
Rank Dif U/I =
VAR Ran =
RANKX (
ALLEXCEPT ( Homogenea, Homogenea[nit] ),
CALCULATE ( [Dif U / I], ALLEXCEPT ( Homogenea, Homogenea[empresa] ) ),
,
DESC,
DENSE
)
RETURN
IF ( [ERH V] = 0, BLANK (), Ran )
Hi Eric_Zhang
It works pretty nice. Thank you very much. But I have another problem I don't know if it is related with the first one. When I select for example a filter like region or industry the Rank still shows me the overall rank but not the specific filter rank, any idea why it happens? It seems like it dosent recognize the filters applied.