Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Multiple IF conditions with text columns

Hi,

 

I would like to add a custom column in my PBI report using multiple IF conditions. 

 

If Term 1 Results = "PASS" & Term 2 Results = "PASS" & Term 3 Results = "PASS", output PASS

If Term 1 Results = "PASS" & Term 2 Results = "REPEAT" & Term 3 Results = "Repeat", output REPEAT

 

I've made several attempts, however PBI is giving me the error "DAX comparison operations do not support comparing values of type True/False with values of type Text. Consider using the VALUE or FORMAT function to convert one of the values."

 

How can I achieve this?

  • Hi Anonymous ,

    this would be one way of creating the calculated column:

    New Column = IF('Table'[Term 1 Results]="Pass" && 'Table'[Term 2 Results]="Pass" && 'Table'[Term 3 Results]="Pass";"Pass";"Repeat")

    If it does not work for you, please post a sample version of your report for troubleshooting

    regards,
    Sturla

1 Reply

  • sturlaws's avatar
    sturlaws
    Resident Rockstar

    Hi Anonymous ,

    this would be one way of creating the calculated column:

    New Column = IF('Table'[Term 1 Results]="Pass" && 'Table'[Term 2 Results]="Pass" && 'Table'[Term 3 Results]="Pass";"Pass";"Repeat")

    If it does not work for you, please post a sample version of your report for troubleshooting

    regards,
    Sturla