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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
JPSingh
Frequent Visitor

How to get the next date from another column using IF / OR statement

I am trying to build a formula which basically tells me what the next date. e.g the one highlighted below what I want is to show the date from engage to lost as this was the next date. I need to do this for each stage so for Diagnose it needs to show me which stage date it went into next and the same for Engage, prescribe and etc. I have tried to do this in Power Query but the formula looks right however, I need it to read or so example below. The next engage date should show if prescribe is blank then select propose date, if propose date is blank then conclusion, if that is blank then lost date.

JPSingh_0-1725363733013.png

This is the formula I used in power query but because I don't have or it just picks up the prescribe date if engage is blank but if prescribe is blank it doesn't pick up propose. Is this possible to do?

 

= Table.AddColumn(#"Expanded Lost (Createddate)", "Diagnose Date to Next Step Date", each if [Engage Created Date] = null then [Prescribe Created Date] else if [Prescribe Created Date] = null then [Propose Created Date] else if [Propose Created Date] = null then [Conclusion Created Date] else if [Conclusion Created Date] = null then [#"Won (Createddate).Created Date"] else if [Conclusion Created Date] = null then [#"Lost (Createddate).Created Date"] else null)

 

 

1 ACCEPTED SOLUTION
JPSingh
Frequent Visitor

Thank you. This works works and is exactly what I needed. Thanks alot

View solution in original post

2 REPLIES 2
JPSingh
Frequent Visitor

Thank you. This works works and is exactly what I needed. Thanks alot

bhanu_gautam
Super User
Super User

@JPSingh , Try using updated formula

 

m
= Table.AddColumn(#"Expanded Lost (Createddate)", "Diagnose Date to Next Step Date", each
if [Engage Created Date] <> null then [Engage Created Date]
else if [Prescribe Created Date] <> null then [Prescribe Created Date]
else if [Propose Created Date] <> null then [Propose Created Date]
else if [Conclusion Created Date] <> null then [Conclusion Created Date]
else if [#"Won (Createddate).Created Date"] <> null then [#"Won (Createddate).Created Date"]
else if [#"Lost (Createddate).Created Date"] <> null then [#"Lost (Createddate).Created Date"]
else null)




Did I answer your question? Mark my post as a solution! And Kudos are appreciated

Proud to be a Super User!




LinkedIn






Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors