Power query - Calculated column to check date

1.5k views Asked by At

I have a column "MYDATE" with dates (dd/mm/yyyy) and I need to create a calculated column that checks if the date is today's date.

I have tried '=if [MYDATE]=DateTime.LocalNow() then "Yes" else ""' this butit did not work because of the different format.

Any suggestion?

1

There are 1 answers

0
MarcelBeug On BEST ANSWER

You can use Date.IsInCurrentDay([MYDATE])

or closer to your attempt:

if [MYDATE] = DateTime.Date(DateTime.LocalNow()) then "yes" else ""

Note that both solutions check against the last refresh date.