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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Mai_Nashaat
Helper II
Helper II

Filter data of last three months in power query

Hi everybody,

 

I've loaded data from folder and combined all files together this excel files are automatically generated report three times daily.

I want to get only the last three months and the last generated report in day (it's about 9 or 11 pm)

this snapshot of the data.

x.png

 

@edhans 

@ImkeF 

 

 

1 ACCEPTED SOLUTION
v-yingjl
Community Support
Community Support

Hi @Mai_Nashaat ,

You can try this query to filter rows:

= Table.SelectRows(#"Changed Type", each Date.IsInPreviousNMonths([Date created], 3) and Time.Hour([Date created]) >= 21 and Time.Hour([Date created])<= 23)

1.png2.png

 

Best Regards,
Community Support Team _ Yingjie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

View solution in original post

2 REPLIES 2
v-yingjl
Community Support
Community Support

Hi @Mai_Nashaat ,

You can try this query to filter rows:

= Table.SelectRows(#"Changed Type", each Date.IsInPreviousNMonths([Date created], 3) and Time.Hour([Date created]) >= 21 and Time.Hour([Date created])<= 23)

1.png2.png

 

Best Regards,
Community Support Team _ Yingjie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

edhans
Super User
Super User

@Mai_Nashaat use the built in date filter:

  1. Click on the date dropdown
  2. Date Filters
  3. In the Previous

edhans_0-1620747463003.png

 

Then pick the month range you want.

edhans_1-1620747592821.png

Then expand/combine the data files.

 

 

 



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.