I have a table of scores which is filtered by year in a slicer. I am using the 'Enlighten Data Story' visual to tell who has the best score in the respective year.
The max score is calculated correctly, but the name of the person with max score is not!
can anybody say what is the problem? I am not using any DAX formulas, because if I am not wrong, it should be filtered via context, right?
Go to Solution.
Try this MEASURE instead of FIRSTname
Measure will respond to filter context but won't respond to another measure. So if you use a MEASURE for MAXscore it wont necessarily get you the top scorer's name
VALUES ( TableName[Name] ),
CALCULATE ( MAX ( TableName[Score] ) ), DESC
View solution in original post
based on the screenshot the context is Year 2017, nothing more
with 'Max of score' you show the max score of 2017 (it's only in Values, so PowerBI looks at least of all score values in 2017 and picks the highest - no change in filter context)
similarly with First Name you show first name of 2017
you would need Score in Filters to filter for max value to have the filter context limited to the highest score, so I think using DAX is actually easier
Proud to be a Super User!
Take a look at the September 2023 Power BI update to learn more.
Join Microsoft Reactor and learn from developers.