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
Anonymous
Not applicable

RANKX not Dynamically Changing Based on Selected Date/Time Filters

I have two calulated columns that I use to display my top Cluster Ids by Cost. The top 10 Cluster Ids are displayed and the rest are thrown into "Other Cluster Ids". When filtering this view based on time, it does not dynamically change. For example, it will show me the correct Cluster Ids for the total date range, but when I filter the time range to the current week, it will continue to display those top Cluster Ids instead of dynamically changing to the ones that are the most for that week. Here are my my calculated columns:

Cluster Id Rank = RANKX(
    ALL( azure_amtz_aggr_cost[ClusterId] ),
    CALCULATE( SUM( azure_amtz_aggr_cost[Cost] ), ALLEXCEPT( azure_amtz_aggr_cost, azure_amtz_aggr_cost[ClusterId] ) )
)
Cluster Id Rank Value = IF(azure_amtz_aggr_cost[Cluster Id Rank] <= 10, azure_amtz_aggr_cost[ClusterId], "Other Cluster Ids")

 

1 REPLY 1
amitchandak
Super User
Super User

@Anonymous , the calculated column can not change with slicer value, you have to create a measure and measure rank

 

Example measure

 

Cluster Id Rank = RANKX(
ALLSELECTED( azure_amtz_aggr_cost[ClusterId] ),
CALCULATE( SUM( azure_amtz_aggr_cost[Cost] ), ALLEXCEPT( azure_amtz_aggr_cost, azure_amtz_aggr_cost[ClusterId] ) )
)


Cluster Id Rank = RANKX(
ALLSELECTED( azure_amtz_aggr_cost[ClusterId] ),
CALCULATE( SUM( azure_amtz_aggr_cost[Cost] ) ) )

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.