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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

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
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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