Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi Everyone,
Can anyone let me know how to get distinct values when same values exists in the table. In the below table i have used Rank function , but not getting distinct values for the same values, due to that i'm not getting 100% in the percent column. 😞
Rank = RANKX(ALLSELECTED('Table'[Field]), [Record Counter])
Thanks in advacne
Solved! Go to Solution.
Hi @harib ,
We can try to use the following measure to meet your requirement:
Rank =
IF (
ISINSCOPE ( 'Table'[Field] ),
RANKX (
ALLSELECTED ( 'Table'[Field] ),
RANKX ( ALLSELECTED ( 'Table'[Field] ), [Record Counter],, ASC, DENSE )
+ RANKX (
ALLSELECTED ( 'Table'[Field] ),
CALCULATE ( MAX ( [Field] ) ),
,
DESC,
DENSE
)
/ CALCULATE ( DISTINCTCOUNT ( 'Table'[Field] ), ALLSELECTED ( 'Table'[Field] ) ),
,
DESC,
DENSE
)
)
If it doesn't meet your requirement, Could you please show the exact expected result based on the Tables that you have shared?
Hi @harib ,
We can try to use the following measure to meet your requirement:
Rank =
IF (
ISINSCOPE ( 'Table'[Field] ),
RANKX (
ALLSELECTED ( 'Table'[Field] ),
RANKX ( ALLSELECTED ( 'Table'[Field] ), [Record Counter],, ASC, DENSE )
+ RANKX (
ALLSELECTED ( 'Table'[Field] ),
CALCULATE ( MAX ( [Field] ) ),
,
DESC,
DENSE
)
/ CALCULATE ( DISTINCTCOUNT ( 'Table'[Field] ), ALLSELECTED ( 'Table'[Field] ) ),
,
DESC,
DENSE
)
)
If it doesn't meet your requirement, Could you please show the exact expected result based on the Tables that you have shared?
Refer : How to break ties in
https://radacad.com/how-to-use-rankx-in-dax-part-1-of-3-calculated-columns
Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution.
In case it does not help, please provide additional information and mark me with @
Thanks. My Recent Blogs -Decoding Direct Query - Time Intelligence, Winner Coloring on MAP, HR Analytics, Power BI Working with Non-Standard TimeAnd Comparing Data Across Date Ranges
Connect on Linkedin
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
112 | |
100 | |
80 | |
64 | |
57 |
User | Count |
---|---|
146 | |
110 | |
93 | |
84 | |
67 |