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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Qotsa
Helper V
Helper V

RANKX incorrect after adding row to matrix

Hi,

 

Below measure works when only one row in the matrix table.

 

Rank CHO3 = RANKX(ALL('Query1'[Group CHO3]),[Last 8 by Con])
 
Qotsa_0-1620829603778.png

 

When I add a second row to the table, all the rankings change to 1.

 

Qotsa_1-1620829755162.png

 

 Don't know what to try.

3 REPLIES 3
v-henryk-mstf
Community Support
Community Support

Hi @Qotsa ,

 

I did the following test and added the fields of the hierarchy to the matrix, and it didn't make an impression on the ranking.

So What is the calculation logic of the created [Last 8 by Con]? It is also possible that the Loaction field in the added hierarchy has an impact on the filter conditions. Can you provide a detailed data model (delete sensitive information) so that I can solve it for you as soon as possible.

Rank CHO3 = RANKX(ALL('Table'[Name]),[Measure],,ASC)

v-henryk-mstf_0-1620977929911.png


Looking forward to your reply.

Best Regards,
Henry

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

amitchandak
Super User
Super User

@Qotsa , if you add any other grouped column in visual, the rank will happen inside that

 

Now Rank will happen inside the location for Group CHO3.

 

Try like

Rank CHO3 = RANKX(ALL('Query1'[Group CHO3],[location]),[Last 8 by Con])

@amitchandak 

Thanks. It's not quite right. The rankings are a bit off.

Qotsa_0-1620833373770.png

 

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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