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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
SJQuick
New Member

Replacing nulls with a date from another column, but only if a third column is not blank

I am trying to replace blank dates with a date from another column, but only if another column is populated with a date. Per the example below, if the Initiate Date is blank replace with Alternate Initiate Date if Complete Date is not blank, e.g. ID 300 and 800. Please not the Alternate Initiate Date was created using a LOOKUP.

 

SJQuick_2-1680205239834.png

I would greatly appreciated any help, as I've been working on this for a while trying many different ways. Everything that I've found on the Internet seems to leave out the "if only another column is not blank" part and/or the LOOKUP column is not selectable in the formula.

1 ACCEPTED SOLUTION
vicky_
Super User
Super User

Create a new column (either in PQ or DAX). 
For DAX: IF(NOT(ISBLANK([Complete Date])) && NOT(ISBLANK([Initiate Date])), [Alternative Initiate Date], [Initiate Date])

View solution in original post

4 REPLIES 4
Ahmedx
Super User
Super User

watch my video you will learn how easy it is to do it in power query
https://1drv.ms/v/s!AiUZ0Ws7G26RhmzwljmUwaso5szz?e=Q6hL8L

Thank you for the video @Ahmedx. I could not get your solution to work in power query due to the alternate date being the product of a LOOKUP, but I have taken note and saved for future use. Have a great day!

vicky_
Super User
Super User

Create a new column (either in PQ or DAX). 
For DAX: IF(NOT(ISBLANK([Complete Date])) && NOT(ISBLANK([Initiate Date])), [Alternative Initiate Date], [Initiate Date])

Thank you so much @vicky_ ! This worked with one minor tweak (removed the second NOT). Have a fabulous day!

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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