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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
ERing
Post Partisan
Post Partisan

How to limit date to most recent day?

I have a table with a Job_Created_On date. The issue I'm facing is the data contains Job_Created_On dates many years into the future. This is not logically possible as the most recent date for a Job_Created_On is TODAY.

I'm trying to improve my report performance so I want to remove any records from my table with a Job_Created_On date that is in the future. I want to limit the table to Job_Created_On dates that are TODAY or in the past.

How can I do this?


Screenshot 2024-12-05 164051.png

2 ACCEPTED SOLUTIONS
Expiscornovus
Super User
Super User

Hi @ERing,

 

You can use a SelectRows which compares it with the DateTime LocalNow.

 

Below is an example

 

1. The below line is added as a new step via the advanced editor.

 

 

#"Filter Future Dates" = Table.SelectRows(#"Changed Type", each [JOB_CREATEDON] <= DateTime.LocalNow())

 

 

newstep.png

 

2. Below is the test data before that new step

 

filterfuturedates.png

 

3. Below is the test data after the new step (all the future dates are filtered)

 

selectrows_function.png

 



Happy to help out 🙂

I share #PowerAutomate and #SharePointOnline content on my Blog, Bluesky profile or Youtube Channel

View solution in original post

Uzi2019
Super User
Super User

Hi @ERing 

Try below video for better understanding
https://www.youtube.com/watch?v=cepZFDUwLQM

https://www.youtube.com/watch?v=rDtMe1exW5g

https://www.youtube.com/watch?v=7jJTEVUtSKI

 

You can try any technique to get the desired result. 
I would suggest simple technique is 3rd video. 

Uzi2019_0-1733468498777.png

 

 

I hope I answered your question!

 

 

Don't forget to give thumbs up and accept this as a solution if it helped you!!!

View solution in original post

2 REPLIES 2
Uzi2019
Super User
Super User

Hi @ERing 

Try below video for better understanding
https://www.youtube.com/watch?v=cepZFDUwLQM

https://www.youtube.com/watch?v=rDtMe1exW5g

https://www.youtube.com/watch?v=7jJTEVUtSKI

 

You can try any technique to get the desired result. 
I would suggest simple technique is 3rd video. 

Uzi2019_0-1733468498777.png

 

 

I hope I answered your question!

 

 

Don't forget to give thumbs up and accept this as a solution if it helped you!!!
Expiscornovus
Super User
Super User

Hi @ERing,

 

You can use a SelectRows which compares it with the DateTime LocalNow.

 

Below is an example

 

1. The below line is added as a new step via the advanced editor.

 

 

#"Filter Future Dates" = Table.SelectRows(#"Changed Type", each [JOB_CREATEDON] <= DateTime.LocalNow())

 

 

newstep.png

 

2. Below is the test data before that new step

 

filterfuturedates.png

 

3. Below is the test data after the new step (all the future dates are filtered)

 

selectrows_function.png

 



Happy to help out 🙂

I share #PowerAutomate and #SharePointOnline content on my Blog, Bluesky profile or Youtube Channel

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Solution Authors