Forum Discussion
Show Latest and future Weeks
- Anonymous5 years ago
Hi AnnaML ,
You could create a new table with Week column(with Year*100+WeekNum format) for slicer,and use the following formula to create a measure:
Week = YEAR ( [Date] ) * 100 + WEEKNUM ( [Date], 1 )Measure = IF ( MAX ( 'Table'[Week] ) >= SELECTEDVALUE ( ForSlicer[Week] ) - 20 && MAX ( 'Table'[Week] ) <= SELECTEDVALUE ( ForSlicer[Week] ) + 4, 1, 0 )Then apply it to visual-level filter,set as "is 1" like this:
Please take a look at the pbix file here.
Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi AnnaML ,
You could create a new table with Week column(with Year*100+WeekNum format) for slicer,and use the following formula to create a measure:
Week =
YEAR ( [Date] ) * 100
+ WEEKNUM ( [Date], 1 )Measure =
IF (
MAX ( 'Table'[Week] )
>= SELECTEDVALUE ( ForSlicer[Week] ) - 20
&& MAX ( 'Table'[Week] )
<= SELECTEDVALUE ( ForSlicer[Week] ) + 4,
1,
0
)Then apply it to visual-level filter,set as "is 1" like this:
Please take a look at the pbix file here.
Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thank you so much for your time and effort! It helped me!