Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!
I have a table in Query Editor that is the result of a lookup for an end date scenario. What I'd like to do is replace the null values with today's date.
I think I could create a calculated column on the front-end, but that would duplicate my data in a file that's already pretty large.
So to be clear, I have this:
| ID | Date |
| 123 | 1/1/2019 |
| 234 | (null) |
| 345 | 1/2/2019 |
| 456 | 1/3/2019 |
And I'd like the end result to be this:
| ID | Date |
| 123 | 1/1/2019 |
| 234 | 4/8/2019 |
| 345 | 1/2/2019 |
| 456 | 1/3/2019 |
Where the 4/8/19 dynamically changes every day to match today's date.
Solved! Go to Solution.
Figured this out.
Hi wondering if someone can help on the topic above? I've tried the fix but think I'm putting DateTime.LocalNow() in the wrong place as I keep getting an errors in the collum rather than values.
Currently reads:
Table.ReplaceValue(#"Parsed Date","0000-00-00 00:00:00",DateTime.LocalNow(),Replacer.ReplaceValue,{"Column1.closure_date"})
Can anyone tell me what it should read to replace 0000-00-00 00:00:00 with today's date and time please?
Thanks!
Figured this out.
I tried same but didn't work for me. Any suggestions?
How can I get this to give me yesterday's instead of today?
Table.ReplaceValue(#"Replaced Value2",null,DateTime.LocalNow(),Replacer.ReplaceValue,{"End Time"})
Hi David
I followed your solution but did not see any cells with 2019, 1, 1, 0, 0, 0. Therefore couldn't replace the string with the dateTime.LocalNow() Is there something I did wrong/am missing?
Many thanks
James
ReplaceDate = IF (DateTable[Date] = blank(), today(), DateTable[Date])
this is in dax. If you don't want to add another column, you may take a look at forum
Worked like a charm.
The Power BI Data Visualization World Championships is back! It's time to submit your entry.
| User | Count |
|---|---|
| 47 | |
| 45 | |
| 33 | |
| 33 | |
| 30 |
| User | Count |
|---|---|
| 138 | |
| 118 | |
| 59 | |
| 58 | |
| 56 |