Forum Discussion

DustinD's avatar
DustinD
Icon for Helper I rankHelper I
3 years ago
Solved

default days before today to todays date

i need some help with power query. i want to make something so that if any dates before today defult to todays date. but i dont want it to changes anything in the future. any help is appreciated. 

 

 

 

  • Hi DustinD ,

     

    Add this as a custom column in Power Query:

    let __today = Date.From(DateTime.LocalNow()) in
    if [Date] < __today then __today else [Date]

     

    Pete

1 Reply

  • Hi DustinD ,

     

    Add this as a custom column in Power Query:

    let __today = Date.From(DateTime.LocalNow()) in
    if [Date] < __today then __today else [Date]

     

    Pete