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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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)

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)

@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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors