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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

Reply
vedhikha
Regular Visitor

SWITCH or IF

I need to write a dax that checks if the column Tenders ="self Tenders" then use "Measure 1" else use "Measure 2". When i use the below the screen blacks out and says "Unexpected Error"

 

SCORE =SWITCH(
    TRUE(),
    CONTAINSSTRING(Carrier[Tenders], "Self Tenders" ), [Overall Score 2],
    [Overall Score]
   )
3 REPLIES 3
Dangar332
Super User
Super User

hi, @vedhikha 

 

 [Overall Score 2], [Overall Score] can you provide code of these measure?

Overall Score = [OTD_SCORE]+[OTP_SCORE]+ SUM(Sheet1[TA_SCORE]) + Claims[Claims_Score]+DASH_OPEN_DISPUTES[Disputes_score]+ SUM('Competitive Pricing'[Rate_score]) + SUM('smartway_partner_list (2)'[Smartway_score])
 
Overall Score 2 = [OTD_SCORE]+[OTD_SCORE]+ SUM(Sheet1[TA_SCORE]) + Claims[Claims_Score]+DASH_OPEN_DISPUTES[Disputes_score]+ SUM('Competitive Pricing'[Rate_score]) + SUM('smartway_partner_list (2)'[Smartway_score])

Hi, @vedhikha 

 

it's difficult to figure out 

please provide some sample data with removing confidential information.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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