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
Nick_Kalichava
Frequent Visitor

RANKX not working right?

Hi, experts!

 

I have a problem with RANKX,

I used 
Rank by Quantity = 
RANKX(
ALL(TABLE),
COUNTA(TABLE[COLUMN])
)

 

 

and this solution did not work,
I tinkered with this dax and it only works this way - 
Rank by Quantity = 
RANKX(
ALL(TABLE[COLUMN]),
CALCULATE(COUNTA(TABLE[COLUMN]))
)

 

Why?

1 REPLY 1
Mahesh0016
Super User
Super User

@Nick_Kalichava Because of you remove all rowcontext filter using ALL(Table) .
your table in plot for e.g class and student and you count student and find rank that which class first rank by student count for that you need remove only student filter not class filter because if you remove class filter so it's give all class before same rank . in short ALL in table means you remove that table all filter thats you APPLY IN report and plot in table and matrix etc.

@Nick_Kalichava I hope you geting my point.

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.