Forum Discussion
relative date show second next week only
Hi,
I want to create a week schedule showing the last, current, next and second next week on a single report each.
I know how to filter for relative dates, but the only option is to choose "element within next 2 calendar weeks".
Is there a way to filter for the data of the week after the next week (as from today: show only CW 17)?
Thanks in advance!
I just wanna let you know that I found the following M Code in Power Query to be working perfectly for creating a relative week number which can be used as a filter:
Relative Week = (Number.From(Date.StartOfWeek([Date]))-Number.From(Date.StartOfWeek(DateTime.LocalNow())))/7
3 Replies
- amitchandak
Super User
You can do with the help week rank. Refer to my file to see how week Rank can help you
https://www.dropbox.com/s/d9898a48e76wmvl/sales_analytics_weekWise.pbix?dl=0
- flex99
Helper I
Wow, that's already quite helpful. Can you help me in creating a week rank that applies always to today's date? My goal is to set a filter "week rank = 2" to always show the data of the second next week based on today's date. Thus it would by dynamic and without creating a measure for the shown data.
I tried to use
Week Rank = RANKX(all(Table);TODAY();;ASC;Dense)but as it only shows "1" for every week, it seems I don't get the logic behind your approach.Thanks for your support!- flex99
Helper I
I just wanna let you know that I found the following M Code in Power Query to be working perfectly for creating a relative week number which can be used as a filter:
Relative Week = (Number.From(Date.StartOfWeek([Date]))-Number.From(Date.StartOfWeek(DateTime.LocalNow())))/7