Forum Discussion
devesqdeves
Helper II
6 years agoRankx + Rand() not working
Hello , i am new to the community and kinda new to power bi . I am trying to rank a column(client) based on a measure that i created ( hc fac value) , and to that measure i added rand(hc fac value ...
- 6 years ago
Hi devesqdeves ,
I assume that you have an ID for each of your client if not please create one with the client number (must be unique values) then add the following measure:
Rank_Without_Duplicates = IF ( HASONEVALUE ( Client[Cliente] ) && [HC FAC Value] > 0; RANKX ( ALL ( Client[Cliente] ); ( CALCULATE ( [HC FAC Value] ) + INT ( CALCULATE ( MIN ( Client[Client ID] ) ) ) / 100000 ) ) )Check result attach.
amitchandak
Super User
6 years agodevesqdeves
Helper II
6 years agoThanks for the input ! But it is not working yet :c
it shows like this
my rank measure =
IF (
HASONEVALUE ( Client[Cliente] ) && [HC FAC Value]>0,
RANKX(All(Client[Cliente]),[HC FAC Value],,DESC) + RAND()/1000)
already tried with dense and skip and still not working :s
it should be 1,2,3,4,5,6,7,8,9 etc , but its still repeating, i dont know what to do , need heelp plz
- MFelix6 years ago
Super User
Hi devesqdeves ,
I assume that you have an ID for each of your client if not please create one with the client number (must be unique values) then add the following measure:
Rank_Without_Duplicates = IF ( HASONEVALUE ( Client[Cliente] ) && [HC FAC Value] > 0; RANKX ( ALL ( Client[Cliente] ); ( CALCULATE ( [HC FAC Value] ) + INT ( CALCULATE ( MIN ( Client[Client ID] ) ) ) / 100000 ) ) )Check result attach.
- devesqdeves6 years ago
Helper II
It worked !! Thanks !!
- MFelix6 years ago
Super User