Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
I have a query that returns for me a list of 365 days of dates, starting from 30 days back. It then identifies the ISO Week number, groups the dates by week, (with the date aggregating by min), and then identifies the current ISO week:
What I would like to do next is find a way to identify any week which is this week + 4. e.g. if it is week 3, I want to mark weeks 3, 4, 5, 6 & 7
It gets a bit complicated if it is currently week 51. Then I would want week 52, 1, 2, 3 & 4
The purpose is to later be able to have a filter where I can include or exclude these specific weeks from my calculations.
I also want to be able to exclude any week in the past.
Thank you
Solved! Go to Solution.
@dapperscavenger & @mahoneypat
I was going to suggest not using the Week Number, but consider changing to the "Start of Week" date.
This option will ignore the resetting of Week Number. Instead you are looking current start of week plus 4 * 7 day in your conditional function.
@dapperscavenger & @mahoneypat
I was going to suggest not using the Week Number, but consider changing to the "Start of Week" date.
This option will ignore the resetting of Week Number. Instead you are looking current start of week plus 4 * 7 day in your conditional function.
Yes this will do it. I think I was over complicting it in my head, when really it doesn't need anything more than a an if statement 😛
Please see these articles. One has a Weeks From Now column that you could use in your measures. The other has a Fiscal Week index you could also use (or adapt to be a fiscal weeks from now column).
No Sort Date Tables! – Hoosier BI
445 Calendar with 53-Week Years – Hoosier BI
Pat
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
102 | |
53 | |
21 | |
12 | |
12 |