Forum Discussion

georgec96's avatar
georgec96
Helper II
4 years ago
Solved

Nested IF Statement

Hi All, I have a question about an nested if statement and I couldn't find an answer anywhere.

 

I have the following two columns

 

Column1Column2
222
blank9
411
blankblank
634
1blank
2455
blank124

 

I would like to create a new column using DAX as follows : IF column 1 is blank take the value from column 2 if column 2 is blank then take the value from column 1 and if both columns are blank leave it as blank.

 

Been trying to find a solution for a few hours now and can't figure it out.

 

Any help much appreciated.

1 Reply

  • tamerj1's avatar
    tamerj1
    Community Champion

    Hi georgec96 

    please use

    COALESCE ( TableName[Column1], 

    TableName[Column2] )