Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
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.
Solved! Go to 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)
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
To learn more about Power BI, follow me on Twitter or subscribe 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)