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

Get inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.

Reply
cfurminger
Frequent Visitor

How to write IF THEN for Multiple Date Columns Power Bi

Hi All,

 

I am trying to create almost a date hieracrhy for a new date coloumn. 

 

In my datasheet I have the following dates in order of importance:

 

- 1st Priority actualshipdate (ASD) (Date product was shipped) 

- 2nd Priority Confirmed Delivery Date (CDD) (Date product has been booked to ship)

- 3rd Priority Expected Delivery Date (EDD) (Product expecting to ship but not yet)

 

I want a new column to to fill in data using the ASD data frist, if that is blank then use CDD if that is blank then use (EDD). 

 

What is the best way to do so? example below. If there are multiple date fields filled in take in order of above. 

(Made a mock up in excel to show - I am trying to create col 'Expected Result'

 

cfurminger_0-1738725874356.png

 

@Daniel29195 @amitchandak @Ritaf1983 @Ahmedx 

1 ACCEPTED SOLUTION
nilendraFabric
Community Champion
Community Champion

Hello @cfurminger 

 

try this DAX

 

ExpectedDate = COALESCE([ASD], [CDD], [EDD])

 

Or this

 

ExpectedDate =
IF(
NOT(ISBLANK([ASD])),
[ASD],
IF(
NOT(ISBLANK([CDD])),
[CDD],
[EDD]
)
)

 

See if this is helpful 

 

View solution in original post

1 REPLY 1
nilendraFabric
Community Champion
Community Champion

Hello @cfurminger 

 

try this DAX

 

ExpectedDate = COALESCE([ASD], [CDD], [EDD])

 

Or this

 

ExpectedDate =
IF(
NOT(ISBLANK([ASD])),
[ASD],
IF(
NOT(ISBLANK([CDD])),
[CDD],
[EDD]
)
)

 

See if this is helpful 

 

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code FABINSIDER for a $400 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

Check out the February 2025 Power BI update to learn about new features.

March2025 Carousel

Fabric Community Update - March 2025

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