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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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
Sept PBI Carousel

Power BI Monthly Update - September 2024

Check out the September 2024 Power BI update to learn about new features.

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

Sept NL Carousel

Fabric Community Update - September 2024

Find out what's new and trending in the Fabric Community.