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
Wisselaar
Helper I
Helper I

RANKX not responding to filters on page

HI there,

 

I use a rankx to get a rank for filtering top 10. But the top 10 is different depending on the filters applied. How do I get RANKX below to respond to a filter? The filter is not on the DQ_Rule[Rule Key], but on items in the same table or on a Date_table.

 

Rank Avg Error % EOM =
IF(
HASONEVALUE( DQ_Rule[Rule Key] );
RANKX(ALL(DQ_Rule[Rule Key]);
CALCULATE(
[Avg Error % EOM If Error];
ALLEXCEPT(DQ_Rule; DQ_Rule[Rule Key])
)
)

)
4 REPLIES 4
v-alq-msft
Community Support
Community Support

Hi, @Wisselaar 

 

If you take the answer of someone, please mark it as the solution to help the other member0s who have same problems find it more quickly. If not, let me know and I'll try to help you further. Thanks.

 

Best Regards

Allan

 

 

v-alq-msft
Community Support
Community Support

Hi, @Wisselaar 

 

You may try modifying the measure as below to see if it works.

Rank Avg Error % EOM =
IF (
    HASONEVALUE ( DQ_Rule[Rule Key] );
    RANKX ( ALLSELECTED ( DQ_Rule ); CALCULATE ( [Avg Error % EOM If Error] ) )
)

 

Best Regards

Allan

 

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

@Wisselaar , I think, This one

RANKX(ALLselected(DQ_Rule[Rule Key]);
CALCULATE(
[Avg Error % EOM If Error];
ALLEXCEPT(DQ_Rule; DQ_Rule[Rule Key])
)
)

 

or

Rank Avg Error % EOM =
IF(
HASONEVALUE( DQ_Rule[Rule Key] );
RANKX(ALLselected(DQ_Rule[Rule Key]);
CALCULATE(
[Avg Error % EOM If Error];
ALLEXCEPT(DQ_Rule; DQ_Rule[Rule Key])
)
)

)

Hi,

 

Thanks for the quick answer, but both just list every [Rule Key] as rank 1. The filters seem to interfere.

 

Marnix

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.