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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Nats_17
New Member

Problem with RANKX while applying top n in filter pane

Hello!
I'm experiencing some trouble with my report. I have the following measures:

Total Gross Profit = SUM(Dane[Order Gross Profit])

and

Subcategory Rank =
RANKX(
    ALL(Dane[Subcategory Name]),  
    [Total Gross Profit], 
    ,
    DESC 
)

when i create a matrix visual with all subcategories, the ranks are correct, as shown below:
Nats_17_0-1736552150696.png


However when i go to the filter pane and filter subcategories to top 5 by total gross profit:

Nats_17_1-1736552216517.png


something weird happens:

Nats_17_2-1736552240923.png

I would like to see subcategory rank as before applying the top n filter.
I have no idea how to fix it and would really appreciate some support.






1 REPLY 1
Ashish_Mathur
Super User
Super User

Hi,

In your measure, change ALL to ALLSELECTED


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.