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
DynamicsHS
Helper II
Helper II

How to replace a value with todays date ?

Hi, 

 

I have a list of dates and some of them are presenting as '31/12/2154'. How can I change those rows listed as '31/12/2154' to todays date?

 

So that every time it refreshes, it shows todays new date. 

 

Thank you,

Henry

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @DynamicsHS ,

Change the measure.

measure = 
IF ( MAX ( 'Table'[date] ) = DATE(2154,12,31), TODAY (), MAX('Table'[date]) )

vpollymsft_0-1668403278198.png

If I have misunderstood your meaing, please provide more details.

 

Best Regards

Community Support Team _ Polly

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

6 REPLIES 6
Anonymous
Not applicable

Hi @DynamicsHS ,

Please have a try.

Create a measure.

measure =
IF ( MAX ( table[date] ) = "31/12/2154", TODAY (), table[date] )

  

Or add a custom column.

if [date] = "31/12/2154" then DateTime.LocalNow() else [date]

vpollymsft_0-1668393720184.png

 

If I have misunderstood your meaing, please provide more details.

 

Best Regards

Community Support Team _ Polly

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi @Anonymous , 

 

I am getting this error:

DynamicsHS_0-1668402766630.png

the date is formatted as a date and not text?

Anonymous
Not applicable

Hi @DynamicsHS ,

Change the measure.

measure = 
IF ( MAX ( 'Table'[date] ) = DATE(2154,12,31), TODAY (), MAX('Table'[date]) )

vpollymsft_0-1668403278198.png

If I have misunderstood your meaing, please provide more details.

 

Best Regards

Community Support Team _ Polly

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi @Anonymous , 

 

This has worked but values (dates) that are not 31/12/2154  are coming up as todays date? instead of showing their orginal date? e.g. 27/10/2021 is showing as todays date and not just 27/10/2021

just needed to change the dates around to 31, 12,2154 and its worked. Thank you

amitchandak
Super User
Super User

@DynamicsHS , refer how can replace date value in power query

https://community.powerbi.com/t5/Power-Query/Replace-value-based-on-date-column/td-p/960200

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

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.

Top Solution Authors