Forum Discussion
RyotNomad
6 years agoFrequent Visitor
Use an if statement to replace values returned by a table
I have a table with a column that contains only 1 or 0. However when I put this into my pie chart my legend shows 1 and 0. I cannot change the values in the table adn I'd prefer not to create a new t...
az38
Community Champion
6 years agoHi RyotNomad
try to create a Column with the same statement, not a measure
- RyotNomad6 years agoFrequent Visitor
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")