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! Request now

Reply
AW31
Helper I
Helper I

Dynamic Rank Not Working

I am attempting to create a dynamic rank to rank all filtered name/accounts (Athlete[Name] by total engagments (Sum of likes and shares columns), but the data isn't filtering out even though I'm using ALLSELECTED. For this example, I've filtered by NHL teams but the graph is still acting like all name/accounts in the database are selected, even though the dynamic rank seems to be working for the filtered names. I've attached the formula I attempted to use and how my relationships are managed. Thanks!Pic1.PNGCapture1.PNG

5 REPLIES 5
Anonymous
Not applicable

HI @AW31,

According to your description, it sounds like you are trying to create a dynamic calculated column to calculate rank based on filter and slicers, right?  If this is a case, current power bi does not support to create dynamic calculate column/table based on filter/slicer. 

In fact, they are work on different data levels, filter and slicer work on data view level which generated from the data model. Power bi does not support using 'sub-level' to effect its 'parent level'.  (Actually, when you enable filter/slicer, you can find they can't affect data model table records)

Regards,

Xiaoxin Sheng

I see I used filter as the wording, but I think I'm just using slicers? When I use a slicer for NHL teams without the rank column created, it only shows the data for those accounts. When I add in the rank column, it populates all accounts even though only the NHL teams is selected on the slicer. So it may not be possible.

Anonymous
Not applicable

Hi @AW31 ,

Dynamic columns based on selection is impossible, but you can write measure to instead. It will be affected by filters and dynamic change calculation result based on its row contents.

Regards,

Xiaoxin Sheng

The formula I used was 

Rank =
Rankx ( ALLSELECTED(Athlete[Name]), Calculate ( [Engagements] ))

This measure was ranking all selections, regardless of my slicers. It ranked the sliced values 1-30, but the other 7500 that were supposed to be sliced out were shown as tied for 31
Anonymous
Not applicable

HI @AW31 ,

Maybe you can try to add an if statement to filter records who have rank larger than 30.

Rank =
VAR _rank =
    RANKX ( ALLSELECTED ( Athlete[Name] ), CALCULATE ( [Engagements] ) )
RETURN
    IF ( _rank <= 30, _rank )

Regards,

Xiaoxin Sheng

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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!

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
Top Kudoed Authors