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
webportal
Impactful Individual
Impactful Individual

Dynamic RANKX with external filters

I have two tables:

Fact:

 
 

9pJqQ.png

 

And 'People':

 

 

The tables are related by Person.

How to calculate the dynaming ranking of TotalSales measure:

TotalSales = SUM('Fact'[Sales])

So that the Ranking responds to the external slicers but not to the rows filter of the table:

 

jsW0B.png

 

The measure I'm trying is the obvious:

 

Ranking = RANKX(ALLSELECTED('Fact'),CALCULATE([TotalSales]))

And many other similar combinations that return wrong results.

4 REPLIES 4
v-xicai
Community Support
Community Support

Hi @webportal ,

 

You may create measure like DAX below.

 

 

 

Ranking =
RANKX (
    FILTER (
        ALLSELECTED ( Fact ),
        Fact[Place] = MAX ( Fact[Place] )
    ),
    CALCULATE ( SUM ( Fact[Sales] ) ),
    ,
    DESC,
    Skip
    
)

 

 

Best Regards,

Amy 

 

Community Support Team _ Amy

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

webportal
Impactful Individual
Impactful Individual

@v-xicai @amitchandak 

 

I get all 1, this DAX is just bull**bleep**, isn't it?

I mean, 48 hours to create a ranking??? And still NO GO!?!

amitchandak
Super User
Super User

@webportal , all selected should have work. remove the person from person table and use it person id from fact and check

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

@amitchandak thanks, but all fields in the visual are from Fact table.

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