Forum Discussion

wahmed20's avatar
wahmed20
Icon for Resolver I rankResolver I
3 years ago
Solved

Assign yesterday date to a field in Filter rows

I have a date Field and I want to filter rows base on that

In the Value , I want to have yesterday date formula.
I used https://learn.microsoft.com/en-us/powerquery-m/datetime-fixedlocalnow in the Query ribbon but it not working.
Only #datetime(2023, 5, 31, 0, 0, 0) is working in Query Editor.
What Query I should have in query editor for yesterday date? My date field is datetime

  • This worked for me 

     

     Date.From(DateTime.LocalNow() - #duration(1,0,0,0))

     

     

     

1 Reply

  • This worked for me 

     

     Date.From(DateTime.LocalNow() - #duration(1,0,0,0))