cancel
Showing results for
Did you mean:
Member

## RANK BY FIGURES AND GROUPS

Hello ,
I have different lot no column on that I want to grouping and based on tender rate decending order ranking .

If you can see in table blue color same tender rate have same rank  (18).

If  we cahnge lot no then rank should be dynamicaly change according to tender rate.

reg ,
Pooja

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team

## Re: RANK BY FIGURES AND GROUPS

You could use RANKX Function to create a column by this formula as below:

`Rank = RANKX(FILTER('Table','Table'[Lot No]=EARLIER('Table'[Lot No])),'Table'[Tender Rate],,DESC,Dense)`

Note:

 Skip The next rank value, after a tie, is the rank value of the tie plus the count of tied values. For example if five (5) values are tied with a rank of 11 then the next value will receive a rank of 16 (11 + 5).This is the default value when ties parameter is omitted. Dense The next rank value, after a tie, is the next rank value. For example if five (5) values are tied with a rank of 11 then the next value will receive a rank of 12.

Result:

Best Regards,

Lin

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

## Re: RANK BY FIGURES AND GROUPS

Hello ,

Is it possible in power bi.???

Reg ,
Pooja

Community Support Team

## Re: RANK BY FIGURES AND GROUPS

You could use RANKX Function to create a column by this formula as below:

`Rank = RANKX(FILTER('Table','Table'[Lot No]=EARLIER('Table'[Lot No])),'Table'[Tender Rate],,DESC,Dense)`

Note:

 Skip The next rank value, after a tie, is the rank value of the tie plus the count of tied values. For example if five (5) values are tied with a rank of 11 then the next value will receive a rank of 16 (11 + 5).This is the default value when ties parameter is omitted. Dense The next rank value, after a tie, is the next rank value. For example if five (5) values are tied with a rank of 11 then the next value will receive a rank of 12.

Result:

Best Regards,

Lin

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

## Re: RANK BY FIGURES AND GROUPS

Best Regards,

Lin

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

## Re: RANK BY FIGURES AND GROUPS

@v-lili6-msftThank you !!!   Its work...

Reg ,
Pooja

Frequent Visitor

## Re: RANK BY FIGURES AND GROUPS

i am trying to find rank, by using RankX function in powerbi

but it's not working can please see it once

Thanks and Regards.

Bobbala Naveen venkates

Member

## Re: RANK BY FIGURES AND GROUPS

`Rank = RANKX(FILTER('Table','Table'[Lot No]=EARLIER('Table'[Lot No])),'Table'[Tender Rate],,DESC,Dense)`

@naveenbobbala3 Try with this....

Frequent Visitor

## Re: RANK BY FIGURES AND GROUPS

i am trying find out the rank by using Riskrating column in powerBI, But it's not working for me.

my data numbers are repeated, So rank also repeated in powerbi. i want rank also incrementing,

please once see it my query.

thanks and regards

Bobbala Naveen

Highlighted
Community Support Team

## Re: RANK BY FIGURES AND GROUPS

`Rank = RANKX(FILTER('Table','Table'[Lot No]=EARLIER('Table'[Lot No])),'Table'[Tender Rate],,DESC,Dense)`

This formula should work well. Do you mean that the Label even for each CountryName have the same Riskating needs to do a rank calculation?

So what the logic for label have the same riskrating to do a rank?

Best Regards,

Lin

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

## Re: RANK BY FIGURES AND GROUPS

Actualy i want display Rank by using Riskrating with in the one country. But i have some repeated numbers in riskrating column,

So, That time rank also repeating in powerbi. Please send me dax function by using rankx.

My Data:-

CountryName              Label                          Riskrating
Afghanistan Brand       Management               15

Afghanistan Brand       Management1             20

Afghanistan Brand       Management2             12

Albania                        management                20

Albania                        management1              20

Albania                        management 2             20

I want Output Like this:-

CountryName              Label                          Riskrating     rank
Afghanistan Brand       Management               15                  3

Afghanistan Brand       Business continuity      20                  1

Afghanistan Brand       Management1             20                  2

Afghanistan Brand       Management2             12                  4

Afghanistan Brand       Management3             12                  5

Albania                        management                20                  1

Albania                        management1              20                  2

Albania                        management 2             20                  3