Forum Discussion

HenryJS's avatar
HenryJS
Post Prodigy
5 years ago
Solved

Power Query Date

Hi all,

 

How can I create a custom column in power query that states:

 

IF [date] is greater than today and less than today +3 months THEN yes

 

Thanks

  • HenryJS 

    Add the following as a custom column:

    = if [Date] > Date.From(DateTimeZone.LocalNow()) and [Date] < Date.From(Date.AddMonths(DateTimeZone.LocalNow(),3)) then "Yes" else "No"

     

1 Reply

  • HenryJS 

    Add the following as a custom column:

    = if [Date] > Date.From(DateTimeZone.LocalNow()) and [Date] < Date.From(Date.AddMonths(DateTimeZone.LocalNow(),3)) then "Yes" else "No"