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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
Anonymous
Not applicable

Rank Multiple Criteria with RLS

Hello All,

 

I am having issues setting up rankings within my dataset. Basically I have results coming in by month with full hierarchy, and I need National Rank and Region Rank by Month. On top of that, I am using RLS in the report so I'm assuming these rankings need to be done in the dataset itself as calculated columns rather than by using measures. I need the user to see their national rank despite the security limiting their report view to their Market.

 

Here's an example of how my data is set up along with the desired results I am trying to get from the calculated rank columns...

MonthRegionMarketDealer% TargetNational RankRegion Rank
1/31/2020Region 1Market 1Steve101%11
1/31/2020Region 1Market 2Bob99%22
2/29/2020Region 2Market 3Bill110%11
2/29/2020Region 1Market 1Steve95%42
2/29/2020Region 1Market 2Bob105%21
1/31/2020Region 2Market 3Bill98%31
2/29/2020Region 2Market 1Bryan103%32
1 ACCEPTED SOLUTION
Anonymous
Not applicable

Something like this?

[National Rank] =
COUNTROWS (
    FILTER (
        ALL ( 'Table' ),
        'Table'[Month] = EARLIER ( 'Table'[Month] )
            && 'Table'[% Target] <= EARLIER ( 'Table'[% Target] )
    )
)
[Region Rank] =
COUNTROWS (
    FILTER (
        ALL ( 'Table' ),
        'Table'[Month] = EARLIER ( 'Table'[Month] )
            && 'Table'[Region] = EARLIER ( 'Table'[Region] )
            && 'Table'[% Target] <= EARLIER ( 'Table'[% Target] )
    )
)

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Something like this?

[National Rank] =
COUNTROWS (
    FILTER (
        ALL ( 'Table' ),
        'Table'[Month] = EARLIER ( 'Table'[Month] )
            && 'Table'[% Target] <= EARLIER ( 'Table'[% Target] )
    )
)
[Region Rank] =
COUNTROWS (
    FILTER (
        ALL ( 'Table' ),
        'Table'[Month] = EARLIER ( 'Table'[Month] )
            && 'Table'[Region] = EARLIER ( 'Table'[Region] )
            && 'Table'[% Target] <= EARLIER ( 'Table'[% Target] )
    )
)
Anonymous
Not applicable

Worked like a charm, thanks!

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.