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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
georgec96
Helper II
Helper II

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 ACCEPTED SOLUTION
tamerj1
Super User
Super User

Hi @georgec96 

please use

COALESCE ( TableName[Column1], 

TableName[Column2] )

View solution in original post

1 REPLY 1
tamerj1
Super User
Super User

Hi @georgec96 

please use

COALESCE ( TableName[Column1], 

TableName[Column2] )

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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

Top Solution Authors