Elio Fernandes
Elio Fernandes

Reputation: 1420

Power query - Calculated column to check date

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?

Upvotes: 2

Views: 1677

Answers (1)

MarcelBeug
MarcelBeug

Reputation: 2967

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.

Upvotes: 3

Related Questions