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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
Lucylangers
New Member

Looking to return todays date in an if formula

Hi all, 

New to PowerBI but long time excel user - I am trying to create a custom column that returns todays date if the value in another column in null, and if not, returning a different date. The whole formula is working except for the todays date function (where I instead change this to a text return the whole thing works). I've tried representing it in multiple ways but to no success . Below is the current formula in PowerBI with the returning error. 

 

Lucylangers_0-1662542974535.png

Lucylangers_1-1662542990136.png

Any help would be really appreciated!!

 

Many thanks,

 

Lucy

 

 

2 ACCEPTED SOLUTIONS
tamerj1
Super User
Super User

Hi @Lucylangers 
Please replace TODAY ( ) with DateTime.LocalNow()

View solution in original post

Lucylangers
New Member

Thank you so much, I had tried to use datetime.localnow before but failed to realise I needed the () after! This works perfectly now. 

View solution in original post

3 REPLIES 3
Lucylangers
New Member

Thank you so much, I had tried to use datetime.localnow before but failed to realise I needed the () after! This works perfectly now. 

tamerj1
Super User
Super User

Hi @Lucylangers 
Please replace TODAY ( ) with DateTime.LocalNow()

Talib5651424
New Member

#if you need a date use Date.From()
Date.From(DateTime.LocalNow())

You should use this instad of TODAY()

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 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.