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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Chris_23
Helper II
Helper II

Ranking measure works is not working on matrix filter criteria. Wrong output

Hi,

 

I have a measure that classifies the three projects with the highest score:

 

 

Spoiler

 Top3 = if(ISFILTERED(SlicerAAA[Info])=false(), "Top3",if(Calculate(Value(RANKX(ALLSELECTED(Submission[Project]), [Score])), ALLEXCEPT(Submission,Submission[Project]),ALLSELECTED(Submission[Date]) , ALLSELECTED(submission[Competition]))<=3, "Top3", "X"))

 

 

Spoiler

 Score = iferror(calculate(values(Submission[TestW]), ALLSELECTED(Submission[Filter])),0.01)*-1

 

In the column of the matrix the measure also works as desired. But now I want to attach the values to a SlicerAAA, which can be used to filter on the best three projects:

 

Chris_23_0-1672672498389.png

 

 

 

But if I set Top3 contains Top in the filter criteria of the matrix then I get an empty matrix. Unless I extend the date range over the whole period. In this case it shows me only the Top3 projects. So in the filter area for the visual, the selected date range is not taken into account, although it is correctly displayed in the matrix.

 

Any ideas what I need to adjust?

 

Kind regards

Chris

 

 

2 REPLIES 2
amitchandak
Super User
Super User

@Chris_23 , refer if this can help

https://www.sqlbi.com/articles/filtering-the-top-3-products-for-each-category-in-power-bi/

 

If this does not help
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

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

Hi @amitchandak ,

 

thank you for your answer. I have now tried a few more approaches, but do not get the desired result.

 

sample pbix: https://1drv.ms/u/s!AsLM3f2rQCP34xz66vVhqHp5pDA5?e=udXGuN

I think the problem is that I calculate the Measure Value or Sum_No_1 over all projects, but not the filtered date range.

 

In principle, I would like to have a ranking only over the projects in the selected time window. Nov22: 1-27
Accordingly, only these projects would be shown in the matrix.

Chris_23_0-1672841201398.png

 

Maybe you see where the problem is.
I would be very grateful.


Kind regards
Chris

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 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.