Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
admin11
Memorable Member
Memorable Member

How to use Power quary to filter date more then 1 may 2022 ?

Hi All

 

I have a PBI sample file . Can some one share with me how to filter date > 1 May 2022 ?

 

admin11_0-1652142648274.png

 

My Sample PBI :-

 

https://www.dropbox.com/s/dka9zhuq0ksqhu8/test%20filter%20more%20then%20may.pbix?dl=0

 

Paul

 

3 REPLIES 3
v-shex-msft
Community Support
Community Support

Hi @admin11,

Did you mean to create a dynamic date filter in your query table?
If that is the case, you can apply a filter on your date field, then you can manually change the generated filter steps and parameterized the filter conditions with date functions and 'DateTime.LocalNow'.

Static filter:

#"Filtered Rows" = Table.SelectRows(#"Changed Type", each [Date] > #date(2022,5,1))

Dynamic filter:

#"Filtered Rows" = Table.SelectRows(#"Changed Type", each [Date] > #date(Date.Year(DateTime.LocalNow()),Date.Month(DateTime.LocalNow()),1))

Date functions - PowerQuery M | Microsoft Docs

DateTime.LocalNow - PowerQuery M | Microsoft Docs

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
amitchandak
Super User
Super User

@admin11 , Click on the column or right-click, GO to filter option, then use custom, and then you will get an option to provide date filter with on or after , use that with date you want

 

refer

https://support.microsoft.com/en-us/office/filter-data-power-query-b5610630-f5bf-4ba4-9217-a628f9b89...

@amitchandak 

I try unable location filter by date. When I click on date column. My application I don't allow create new column date.

hope you can advise me.

Paul

 

Helpful resources

Announcements
PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.