Forum Discussion
Relative Date Slicer Week only
- Anonymous2 years ago
Hi derekmac
The slicer cannot only choose the week, but maybe you can refer to the follwing solution to substitue it.Sample data
1.Create a number paramater to set it as last week slicer
2.Then create a measure
Measure = VAR a = SELECTEDVALUE ( Parameter[Parameter] ) VAR b = MAXX ( ALLSELECTED ( 'Table 2'[Date] ), [Date] ) - 7 * a + 1 RETURN IF ( SELECTEDVALUE ( 'Table 2'[Date] ) >= b && SELECTEDVALUE ( 'Table 2'[Date] ) <= MAXX ( ALLSELECTED ( 'Table 2'[Date] ), [Date] ), 1, 0 )3.Then you can create a visual and put the data to the visual, then put the measure to the visual filter(e.g table visual)
Output
Best Regards!
Yolo Zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi derekmac
The slicer cannot only choose the week, but maybe you can refer to the follwing solution to substitue it.
Sample data
1.Create a number paramater to set it as last week slicer
2.Then create a measure
Measure =
VAR a =
SELECTEDVALUE ( Parameter[Parameter] )
VAR b =
MAXX ( ALLSELECTED ( 'Table 2'[Date] ), [Date] ) - 7 * a + 1
RETURN
IF (
SELECTEDVALUE ( 'Table 2'[Date] ) >= b
&& SELECTEDVALUE ( 'Table 2'[Date] )
<= MAXX ( ALLSELECTED ( 'Table 2'[Date] ), [Date] ),
1,
0
)
3.Then you can create a visual and put the data to the visual, then put the measure to the visual filter(e.g table visual)
Output
Best Regards!
Yolo Zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.