Forum Discussion
Anonymous
5 years agoNot applicable
DAX not working.
Hi.
I have created 2 measures using same formula, but one of my DAX is not working and other is working fine.
I have attached screenshots of the same.
Highest Qualifications and Attendance are calculated using same formula;
Highest Qualifications = MAX(WC_Years[QualifiedTeams])
Highest Qualifications = MAX(WC_Years[QualifiedTeams])
Highest Attendance = MAX(WC_Years[Attendance])
I don't know why it is giving an error.
Anonymous
So you need the year with the highest value:Qualification = MAXX( TOPN ( 1, ALLSELECTED (WC_YEARS[YEAR]), [Highest Qualification] ), WC_YEARS[YEAR] )
7 Replies
- Fowmy
Super User
Anonymous
The 2nd screenshot doesn't show the Qualification measure, you need to clear on it and share the screenshot.
You use ALLSELECTED(WC_Years[Year]) instead of GROUP BY- AnonymousNot applicable
- AnonymousNot applicable
You are getting this error because the TOPN function is returning multiple values. There are multiple years for which the value is equal to Highest Qualifications.