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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Kelz0484
New Member

Returning todays date if other conditions are not met

Hi,

I have a dashboard with 2 date columns. 

Column A is a end date and column B is an extension date. I need a latest date column added with the following conditions:

If End date is > extension date then use end date,

If extension date is >= end date then use extension date else use todays date.

Note: Todays date would be used if both columns A&B were empty. 

I currently have the below If statement:

Latest Date = if[Extension Date]>=[End Date],[Extension Date],if[End Date]>[Extension Date],[End Date],today()))

But it isn't giving me today's date in the outcome its leaving blank cells.

 

Hope this makes sense

Any help appreciated

Thanks!

 

 

1 ACCEPTED SOLUTION
Martin_D
Super User
Super User

Hi @Kelz0484 ,
if[Extension Date]>=[End Date] is ture in case both columns are blank, then your formula returns [Extension Date] which is blank.
This formula should do the job:

 

COALESCE ( MAXX ( { 'Table'[End Date], 'Table'[Extension Date] }, [Value] ), TODAY() )

 

 

github.pnglinkedin.png

View solution in original post

2 REPLIES 2
Martin_D
Super User
Super User

Hi @Kelz0484 ,
if[Extension Date]>=[End Date] is ture in case both columns are blank, then your formula returns [Extension Date] which is blank.
This formula should do the job:

 

COALESCE ( MAXX ( { 'Table'[End Date], 'Table'[Extension Date] }, [Value] ), TODAY() )

 

 

github.pnglinkedin.png

Brilliant. Works a treat! Thank you so much.

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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!

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.