Forum

Notifications
Clear all

filtering dates

4 Posts
2 Users
0 Reactions
94 Views
(@usb)
Posts: 244
Honorable Member
Topic starter
 

The attachment in Hebrew has a column DATE
I need to filter the table in QUERY and display the dates until yesterday - TODAY()-1
How to do it?

 
Posted : 11/12/2019 12:13 am
(@mynda)
Posts: 4762
Member Admin
 

Hi Lea,

I couldn't use your file because my Power Query wouldn't work with your Hebrew data, but you can use these functions as the Power Query equivalent of TODAY:

=DateTime.Date(DateTime.LocalNow())-1

Mynda

 
Posted : 11/12/2019 7:38 pm
(@usb)
Posts: 244
Honorable Member
Topic starter
 

query-problem.JPG

Hi,
Where do I put the formula?
I am attaching a file that has only a date in English, so you can enter my answer.
In addition, a screenshot is attached to a problem I am having -
I'm entering a custom column pane and the formula part is small and you can't write anything in it, I just see the = sign, what can I do?

Thank you!! Leah

 
Posted : 12/12/2019 12:39 am
(@mynda)
Posts: 4762
Member Admin
 

Hi Lea,

Actually, you can omit the -1 and just use the < logical test.

I just applied a filter on the date column using filter drop down on the date column Date Filters > Before > in the dialog box pick any date.

Then edit the formula in the formula bar from what it returns. Mine was this:

= Table.SelectRows(#"Filtered Rows", each [DATE] < #date(2019, 12, 11))

to this:

= Table.SelectRows(#"Changed Type", each [DATE] < DateTime.Date(DateTime.LocalNow()))

Mynda

 
Posted : 12/12/2019 1:17 am
Share: