cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
karma123
Advocate I
Advocate I

Rank

Hi, 

 

I am trying to rank  a list of clients by the gross premium

 

I have a table with the names of clients and theyre gross premium, when I add the rank in the table the rank works correctly

 

I then created a card with the Rank measure where I filtered for a specific client, this measure then gives me a 1 higher rank than in the table. 

 

Does the rank work differently when filtered ?

 

I am currently using 

RANKX(ALL(Client[ClientName]),VALUE((Amount[Gross Premium])))
 
 
5 REPLIES 5
karma123
Advocate I
Advocate I

karma123_0-1670340201921.png

 

 

 

On the Card visual I have filtered for a client but I am getting the rank as 9 but on the table it is showing the rank as 8.

 

The formulae used is rankx(all(client),value(gross premium)

 

I have tried using Allselected in the formula but this just gives a rank as 1

 

Would really appreciate any solutions,

 

Thanks, 

karma123
Advocate I
Advocate I

Thanks, I tried the Allselected formulae however this just gives me 1 as the Rank

Hi @karma123 ,

In order to make a deep troubleshooting and give you a suitable solution, could you please provide some raw data in your table 'Client' and 'Amount' (exclude sensitive data) with Text format and your expected result with backend logic and special examples. By the way, is there any relationship between the table 'Client' and 'Amount'? If yes, please provide the relationship info(cardinality, cross filter direction and base field etc). It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.

How to upload PBI in Community

Best Regards

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
v-yiruan-msft
Community Support
Community Support

Hi  @karma123 ,

Whether your problem has been resolved? If yes, could you please mark the helpful post as Answered? It will help the others in the community find the solution easily if they face the same problem as yours. Thank you.

Best Regards

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
v-yiruan-msft
Community Support
Community Support

Hi @karma123 ,

Please update the formula of measure as below and check if it can return the correct result...

Rank =
RANKX (
    ALLSELECTED ( Client[ClientName] ),
    VALUE ( ( Amount[Gross Premium] ) )
)

 

If the above one can't help you get the desired result, please provide some sample data in your table 'Client' and 'Amount' (exclude sensitive data) with Text format and your expected result with backend logic and special examples. By the way, is there any relationship between the table 'Client' and 'Amount'? If yes, please provide the relationship info(cardinality, cross filter direction and base field etc). It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.

How to upload PBI in Community

Best Regards

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Exciting changes

Power BI Community Changes

Check out the changes to the Power BI Community announced at Build.

May 2023 update

Power BI May 2023 Update

Find out more about the May 2023 update.

Kudo Data Story carousel

Data Stories Gallery

Visit our Data Stories Gallery and give kudos to your favorite Data Stories.

Top Solution Authors