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

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
SanketBhagwat
Solution Sage
Solution Sage

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.

 

Screenshot (127).pngScreenshot (129).png

 

Highest Qualifications and Attendance are calculated using same formula;
Highest Qualifications = MAX(WC_Years[QualifiedTeams])
Highest Attendance = MAX(WC_Years[Attendance])
 
I don't know why it is giving an error.
 
 
1 ACCEPTED SOLUTION

@SanketBhagwat 

So you need the year with the highest value:

Qualification = 

MAXX(
    TOPN (
        1,
        ALLSELECTED (WC_YEARS[YEAR]),
        [Highest Qualification]
    ),
    WC_YEARS[YEAR]
)
Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

View solution in original post

7 REPLIES 7
Fowmy
Super User
Super User

@SanketBhagwat 

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

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Hi @Fowmy 

ALLSELECTED() too is giving the same error.

 

Screenshot (130).png

 

Anonymous
Not 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. 

Hi @Fowmy @Anonymous 

I just noticed that there are multiple year values for which the 'Highest Qualifications' measure is giving the same value.

Do you guys know any DAX which will return only 1 year value.

 

 

@SanketBhagwat 

You can use MAXX

Attendnace = 
MAXX (
  VALUES(WC_YEARS[YEAR]),
  [Highest Attendance]
)

 Qualification = 
MAXX (
  VALUES(WC_YEARS[YEAR]),
  [Highest Qualification]
)

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Sorry, but the solution you provided didn't gave the correct answer.
Screenshot (131).png

 

@SanketBhagwat 

So you need the year with the highest value:

Qualification = 

MAXX(
    TOPN (
        1,
        ALLSELECTED (WC_YEARS[YEAR]),
        [Highest Qualification]
    ),
    WC_YEARS[YEAR]
)
Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Helpful resources

Announcements
October Power BI Update Carousel

Power BI Monthly Update - October 2025

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