Forum Discussion
Use an if statement to replace values returned by a table
Hi RyotNomad
try to create a Column with the same statement, not a measure
Hi. Could you show me how the DAX would look? I've clicked create new column and then used col = IF(Applicant[col], "Yes","No) but I get an error on the Yes saying it's invalid
- az386 years ago
Community Champion
you have a good and correct statement
= IF('applicant'[col] = 1, "Yes", "No")please, show text of Error
- RyotNomad6 years agoFrequent VisitorThe syntax for "Yes" is incorrect. (DAX(IF( (Applicant[X6_13]) = 1. "Yes", "No"))).My actual column name is X6_13. I don't know why it's putting a full stop after the 1. It's clearly a comma in my DAX statementMy exact Code:Column= IF( (Applicant[X6_13]) = 1, "Yes", "No")
- Anonymous6 years agoNot applicable
Hi RyotNomad,
What type of value existed in your 'x6_13' field? Please check it to use the correct value in your if statement: (you can't directly use equal operator to compare with text and number value)
Number version:
Column = IF ( Applicant[X6_13] = 1, "Yes", "No" )Text version:
Column = IF ( Applicant[X6_13] = "1", "Yes", "No" )Notice: please also check your calculated column data type if it does not recognize as a text value.
If above not helps, can you please share more detail information about your scenario?
How to Get Your Question Answered Quickly
Regards,
Xiaoxin Sheng