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
joooffice
Helper I
Helper I

Filter data to a specific date relative to today

I have a whole series of data of which one column is a date. I would like to filter the data to show me only the rows for the next Saturday relative to today.

 

So if today is the 14th August, the next Saturday is the 15th so I only want to see data for the 15th. but on Sunday 16th I would want to see only the data for the next saturday 22nd August. 

 

The dates I need will always be saturdays but I need it to work off automatically off todays date rather than manually selecting the date in the filter. Is there a way of doing this?

 

I am using power query.

1 ACCEPTED SOLUTION

Thanks - this gave me the date for the sunday not the saturday but i figured out how to make it work 

 

= Date.EndOfWeek(Date.From(DateTime.LocalNow()),Day.Sunday)

View solution in original post

2 REPLIES 2
mahoneypat
Employee
Employee

Here is one way to do this.

 

1.  Make a separate blank query with this as the Source line

 

= Date.EndOfWeek(Date.From(DateTime.LocalNow()))

 

This will get the date of the next Saturday each week.

 

2. Filter the date column in your data by any date, then replace the hard-coded date with the name of the query from #1.

 

If this works for you, please mark it as the solution.  Kudos are appreciated too.  Please let me know if not.

Regards,

Pat





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


Thanks - this gave me the date for the sunday not the saturday but i figured out how to make it work 

 

= Date.EndOfWeek(Date.From(DateTime.LocalNow()),Day.Sunday)

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.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors