cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
AlexanderBrueck
Regular Visitor

Rank values without duplicate ranking

Dear Community,

 

I tried to get the ranking displayed in column "Rank" by using Rankx - without success.

 

The idea is to rank the amounts in column "€" for each month. When there are duplicate values (e. g. 2.950 € in March) the first apperance should be 3 for instance and all following rankings for the the values should get the next higher number - in this case 4.

 

Is there any solution for this? Thanks in advance!

powerbi_rank.PNG

1 ACCEPTED SOLUTION
Zubair_Muhammad
Community Champion
Community Champion

@AlexanderBrueck 

 

We can take help from an Index column to manage duplicates

First add an index columm from Query Editor. Then this DAX calculated column

 

Rank Column =
RANKX (
    FILTER (
        Table1,
        Table1[date].[Month] = EARLIER ( Table1[date].[Month] )
            && Table1[date].[Year] = EARLIER ( Table1[date].[Year] )
    ),
    [Euro]
        - [Index] / POWER ( 10, 9 ),
    ,
    DESC,
    DENSE
)
Regards
Zubair

Please try my custom visuals


View solution in original post

1 REPLY 1
Zubair_Muhammad
Community Champion
Community Champion

@AlexanderBrueck 

 

We can take help from an Index column to manage duplicates

First add an index columm from Query Editor. Then this DAX calculated column

 

Rank Column =
RANKX (
    FILTER (
        Table1,
        Table1[date].[Month] = EARLIER ( Table1[date].[Month] )
            && Table1[date].[Year] = EARLIER ( Table1[date].[Year] )
    ),
    [Euro]
        - [Index] / POWER ( 10, 9 ),
    ,
    DESC,
    DENSE
)
Regards
Zubair

Please try my custom visuals


View solution in original post

Helpful resources

Announcements
PBI User Groups

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Get Ready for Power BI Dev Camp

Power BI Dev Camp - June 24th

Mark your calendars and join us for our next Power BI Dev Camp!

Top Solution Authors
Top Kudoed Authors