Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
OjasBI
Frequent Visitor

RANKX Measure issue

Hi,

 

Rank.png

 

I was trying to create rank using RANKX function.
However I was facing an issue. Lets consider above scenario.
I have sorted the data by Rank above.
The rank for the 1st row is 4. This is because there are 4 rows for that Region, Cat and Supp.
They have been aggregated and displayed which is fine.
However, the rank displayed is 4. I want to give Rank 1,2,3...
Basically calculate the rank based on the rows in grid and not what is there in db.

 

Any help is appreciated.
Thanks !!!!

 

1 ACCEPTED SOLUTION
v-jiascu-msft
Microsoft Employee
Microsoft Employee

@OjasBI

 

Hi,

 

It seems that you used RANKX in a calculated column. You can make the visual display from 1. But this couldn’t be your purpose. Maybe you need a measure like this. Please have a try.

MeasureRankx =
RANKX ( ALL ( 'Table'[Supp] ), CALCULATE ( SUM (‘Table’[Sp] ) ) )

 

RANKX Measure issue.jpg

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Best Regards!

Dale

 

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

View solution in original post

2 REPLIES 2
v-jiascu-msft
Microsoft Employee
Microsoft Employee

@OjasBI

 

Hi,

 

It seems that you used RANKX in a calculated column. You can make the visual display from 1. But this couldn’t be your purpose. Maybe you need a measure like this. Please have a try.

MeasureRankx =
RANKX ( ALL ( 'Table'[Supp] ), CALCULATE ( SUM (‘Table’[Sp] ) ) )

 

RANKX Measure issue.jpg

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Best Regards!

Dale

 

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

Thanks Dale !!!
That helped.

Helpful resources

Announcements
June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

May 2025 Monthly Update

Fabric Community Update - May 2025

Find out what's new and trending in the Fabric community.