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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

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
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

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