Forum

Filter in power que...
 
Notifications
Clear all

Filter in power query by today

3 Posts
2 Users
0 Reactions
74 Views
(@thenewbee)
Posts: 26
Eminent Member
Topic starter
 

Hello erverybody,

I have created a table in power query and could filter by a "DATE".

Here I´m filtereing column "DATE" for all values, that are earlier that 29th March of 2021.

= Table.SelectRows(#"Umbenannte Spalten", each [DATE] < #datetime(2021, 3, 29, 0, 0, 0))

 

Unfortunately I have to change this ervery time, when I´m open the file manually.

Is there any chance, to link this automatically to the current day, like a simple Excel formula like "=today()" ?

 

Best wishes to you all 🙂

 
Posted : 22/04/2021 9:11 am
Anders Sehlstedt
(@sehlsan)
Posts: 968
Prominent Member
 

Hello,

Check out this function.
https://docs.microsoft.com/en-gb/powerquery-m/datetime-fixedlocalnow

Br,
Anders

 
Posted : 22/04/2021 5:25 pm
(@thenewbee)
Posts: 26
Eminent Member
Topic starter
 

Hello Anders,

 

thanks a lot for that function. 🙂

At the beginning I got a lot of errors, and was not able to understand the reson, but now it works 🙂

= Table.SelectRows(#"Umbenannte Spalten", each [DATE] < DateTime.FixedLocalNow())

 
Posted : 23/04/2021 9:14 am
Share: