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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
Anonymous
Not applicable

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, @Anonymous 

 

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, @Anonymous 

 

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

@Anonymous , 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])
)
)

)

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

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
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors