Supplies are limited. Contact info@espc.tech right away to save your spot before the conference sells out.
Get your discountScore big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount
Hello
Last I can see this being asked for is 2018. Wondering if umpteen updates later it is possible
Short version is I have a DATES table with Trans_Date, Week and Week_Int, the latter being an Integer version of Week (Long story)
It is not considered to be a PowerBi date table or date hierarchy
My other table is Transactions with various data including Trans_Date with appropriate relationships
I have a measure
@vicky_
Firstly, apologies for not responding quicker. I didn't get a notification of response.
I had 1 two minutes ago, an anniversary alert
Had a quick play with your solution: it has created this week from Sunday 18th to Saturday 24th rather than Monday 19th to Sunday 25th. Will have to work out why, I am almost certain our calendar runs Monday to Sunday
Further, it has put "this week" in all corresponding years going right back in the calendar which made me laugh
Thanks and apologies again
There is a method, but it requires some small tweaks to your Date Table.
Date Table = ADDCOLUMNS(
CALENDARAUTO(),
"Week",
var thisWeek = WEEKNUM(TODAY())
RETURN IF(WEEKNUM([Date]) = thisWeek, "This Week", FORMAT([Date], "yyyy") & " Week " & WEEKNUM([Date]))
)
Above is the DAX i used to create a date table - it's basically just your table, but i have a special value that is dynamically updated for the current week. I will then use the new "Week" column I created in a regular slicer, and set the default value of the slicer to "This Week". When the next week rolls around (plus minus a few hours for Time Zone differences), the value in the slicer should still be set to "This Week", but the dates that it is pointing to should update accordingly, and you still have the option to select other weeks in your slicer.
Some things to consider:
I didn't do a sort column for my calculated Week column, but you can easily add one in.
You can't use a slider for text types, so your users will need to use a drop-down / list to select their week of interest