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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
DFPRO
Frequent Visitor

Calculating a Rank with Time Filters

I have a few measures that go into creating a Rank of a performance score for each person based on numerous performance scores received over the course of a year. I then created a measure that will display the selected person's final ranking in a card: 

var _Table = summarize(filter(all(People),People[Test Count]>0),People[Name],"Performance Rank",[Performance Rank])
var _Slicer = selectedvalue(People[Name])
var _rank = filter(_Table,People[Name]=_Slicer)
return
Maxx(_rank,[Performance Rank])

 

A couple of notes: The Performance Ranking has to only include people who have actually had performance reviews, so I included the People[Test Count]>0 in the summarize function to account for that. All of this works perfectly...until I filter by date. 

 

In my Performance Ranking Table which contains each person's rank, I can successfully filter by date to see the Ranking Table for January through March, for example. However, in the Card Display measure above, there is an issue. The summarize function draws from a calculated column for [Test Count]>0, which is static. Therefore if I filter by January through March, that summarize function will include people who didn't get reviewed until April. Accordingly, the value displayed in the Card for a specific person is different: 

 

Person is ranked 21 out of 23 in Jan-Mar. However, if you were to include all people who eventually got ranked, this person's rank for Jan-Mar jumps to 47. 

 

I've tried a couple of ways to filter my summarize function by measures for dynamic Test Count>0 and for dynamic Performance Score<>blank. These don't seem to produce the desired result in the virtual table. 

 

Any ideas? 

1 REPLY 1
Anonymous
Not applicable

Hi @DFPRO ,

 

Please try:

var _Table = summarize(filter(allselected(People),People[Test Count]>0),People[Name],"Performance Rank",[Performance Rank])
var _Slicer = selectedvalue(People[Name])
var _rank = filter(_Table,People[Name]=_Slicer)
return
Maxx(_rank,[Performance Rank])

If the above one can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. Thank you.

 

Best Regards,

Neeko Tang

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

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors