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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

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
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Feb2025 NL Carousel

Fabric Community Update - February 2025

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