Forum Discussion

YavuzDuran's avatar
YavuzDuran
Icon for Helper III rankHelper III
3 years ago
Solved

RANKX in Merged tables

I have merged two tables (2 manager team groups) in one table but now duplicating the ranks shown below

 

used this function

Rank - Current = IF(HASONEVALUE (AgentsList[Full Name] ) && [Current % - Ending] >0,RANKX ( ALL( AgentsList[Full Name] ),[Current % - Ending]))
 
Normally I should have the ranks 1 to 13 in this table
 
Can you please help?

 

 

  • Hi , YavuzDuran 

    According  to your description, you want to rank the [Current %].

    I don't really understand your Merged Table, no matter how your Table is generated, Measure is always calculated based on the current context.

    Here are the steps you can refer to :
    This is my test data:

    I create a measure to test:

    Current % Measure = SUM('Table'[Current %])
     
    We can create a measure like this :

    Measure = RANKX( ALLSELECTED('Table'[Full Name],'Table'[Manager]) , [Current % Measure] , ,DESC,Dense)

    Then we can put the fields we need on the visual and the result is as follows:

     

     

     

     

    If this method does not meet your needs, you can provide us with your special sample data and the desired output sample data in the form of tables, so that we can better help you solve the problem. (You can also upload you sample .pbix [without sensitive data] to the OneDrive and share with the OneDrive link to me ! )

    Thank you for your time and sharing, and thank you for your support and understanding of PowerBI! 

     

    Best Regards,

    Aniya Zhang

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

     

2 Replies

  • Hi , YavuzDuran 

    According  to your description, you want to rank the [Current %].

    I don't really understand your Merged Table, no matter how your Table is generated, Measure is always calculated based on the current context.

    Here are the steps you can refer to :
    This is my test data:

    I create a measure to test:

    Current % Measure = SUM('Table'[Current %])
     
    We can create a measure like this :

    Measure = RANKX( ALLSELECTED('Table'[Full Name],'Table'[Manager]) , [Current % Measure] , ,DESC,Dense)

    Then we can put the fields we need on the visual and the result is as follows:

     

     

     

     

    If this method does not meet your needs, you can provide us with your special sample data and the desired output sample data in the form of tables, so that we can better help you solve the problem. (You can also upload you sample .pbix [without sensitive data] to the OneDrive and share with the OneDrive link to me ! )

    Thank you for your time and sharing, and thank you for your support and understanding of PowerBI! 

     

    Best Regards,

    Aniya Zhang

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly