Forum Discussion
Dynamic Bookmark
Hi RKK ,
For your problem, it may be a problem with the calculation column, we try to create a new calculation column to test hope it will help you!
IsLastWeek =
VAR TodayDate =TODAY()
VAR CurrentWeekStart = TodayDate - MOD(WEEKDAY(TodayDate, 2) + 3, 7)
VAR LastWeekStart = CurrentWeekStart - 7
VAR LastWeekEnd = CurrentWeekStart - 1
RETURN
IF('Table'[Date] >= LastWeekStart && 'Table'[Date] <= LastWeekEnd, 1, 0)
We hereby change the date to December 26th can fulfill your needs, hope it will be helpful to you!
Check out my pbix file if you still have questions, hope it helps!
Hope it helps!
Best regards,
Community Support Team_ Tom Shen
If this post helps then please consider Accept it as the solution to help the other members find it more quickly.
Hi Anonymous
- ivana_tomekova10 months agoAdvocate II
I think it this case, you also need to create specific column, called e.g. WeekName, with Date values like you have 12/12/2024, etc. and with specific text value 'Last week' for previous week (no date). And for Last Week bookmark, you need to use this text value in slicer.
If you would be using date values in slicer, PBI will always remember your last selection, which was in this case 12/12/2024 ... if you will change it to text field 'Last week', it would also stay selected by default, but in the background it would dynamically mean different timerange.... Example on month level:
You can eassily create it as conditional column: If IsLastWeek = 1 then 'Last Week' else WeekStart