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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
vjnvinod
Impactful Individual
Impactful Individual

RankX formula issue

 

hi Experts,

 

i am getting 2 different results for the RankX function

 

first screenshot same details, rank starts from 1

vjnvinod_0-1644900462283.png

 

The second screenshot same details, rank starts from 2

 

vjnvinod_1-1644900541131.png

 

why in the 2nd screenshot the rankx formula is not giving the correct result, it should start from 1?

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@vjnvinod , Are these two same tables?

sort on week start date and check for min one. Also if there is any blank value, the rank may start with 2.

 

Also, there no need of all('Date') in column rank

 

you can use

Rankx('Date', [week start],,asc,dense)

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@vjnvinod , Are these two same tables?

sort on week start date and check for min one. Also if there is any blank value, the rank may start with 2.

 

Also, there no need of all('Date') in column rank

 

you can use

Rankx('Date', [week start],,asc,dense)

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

@amitchandak 

 

awesome you are a genius, the issue came up because of ALL functions. I removed it based on your advice & it fixed the issue

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Kudoed Authors