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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
mturcotte
Frequent Visitor

Issue with RANKX

Hi,

 

I'm running into a problem with RANKX over a simple table with RANKX code that works with many other reports (over different tables)...

 

I'm sure the problem is a simple one to resolve but I just can't put my finger on it. I have used the problematic ranks to apply Conditional Highlighting on the TOP 1 rank to make my problem easy to spot across various columns.

 

What I want to acheive (and succeeded in doing so in other reports with other tables) is to have distinct ranks assigned to distinct values of the columns G, C, D, L (i.e. highest value of "G" gets rank 1 in column "G - Rank", second highest value of "G" gets rank 2 in column "G - Rank", etc). Currently, same rank gets applied to different values.

 

Any help is much appreciated!

 

RANKX_Problem.png

 

ZIP file with the report:

https://1drv.ms/u/s!ArclD4PLnaKAnxOd1PoUWxk8igqe?e=IAxW5N

2 REPLIES 2
jdbuchanan71
Super User
Super User

@mturcotte 

If you change the ALLSELECTED ( RANKX_Problem ) to ALLSELECTED ( RANKX_Problem[YYYYMM] ) does that give you the result you are expecting?

RankX.jpg

Thank you jdbuchanan71 for your reply.

 

While your suggestion helps with the specific exemple report I posted, it made me realize that in the process of anonymizing the data from the original report where I'm struggling with RANKX I mangled some of the code I used for conditional highlighting background and font colors.

 

It also made me realize that in my anonymizing process I also took a shortcut that might play a role in my problem.

 

Currently, my problem with RANKX remains an issue in my actual report even when I make the adjustment corresponding to your suggestion.

 

So, I will need to investigate and possibly poste again with another revision to my example.

 

Thank again. MT


@jdbuchanan71 wrote:

@mturcotte 

If you change the ALLSELECTED ( RANKX_Problem ) to ALLSELECTED ( RANKX_Problem[YYYYMM] ) does that give you the result you are expecting?

RankX.jpg


 

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.