Forum Discussion
comparing selected date to a fix dates
- 6 years ago
Hi nardtmo ,
We can use the following steps to meet your requirement.
1. We can create a measure like this,
%Diff_BL_Volume = VAR WK7 = CALCULATE ( [Volume], FILTER ( ALLEXCEPT ( 'Date Table', 'Date Table'[day name] ), 'Date Table'[week] = 7 ) ) VAR WK8 = CALCULATE ( [Volume], FILTER ( ALLEXCEPT ( 'Date Table', 'Date Table'[day name] ), 'Date Table'[week] = 8 ) ) VAR WK9 = CALCULATE ( [Volume], FILTER ( ALLEXCEPT ( 'Date Table', 'Date Table'[day name] ), 'Date Table'[week] = 9 ) ) VAR BL = CALCULATE ( ( wk7 + WK8 + WK9 ) / 3 ) RETURN DIVIDE ( [Volume] - BL, BL, 0 )2. Then we need to add two slicer, one controls week number, another controls week day name.
The result like this,
If it doesn’t meet your requirement, could you please show the exact expected result based on the table that we have shared?
BTW, pbix as attached.
Best regards,
Community Support Team _ zhenbw
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi nardtmo ,
We can use the following steps to meet your requirement.
1. We can create a measure like this,
%Diff_BL_Volume =
VAR WK7 =
CALCULATE (
[Volume],
FILTER (
ALLEXCEPT ( 'Date Table', 'Date Table'[day name] ),
'Date Table'[week] = 7
)
)
VAR WK8 =
CALCULATE (
[Volume],
FILTER (
ALLEXCEPT ( 'Date Table', 'Date Table'[day name] ),
'Date Table'[week] = 8
)
)
VAR WK9 =
CALCULATE (
[Volume],
FILTER (
ALLEXCEPT ( 'Date Table', 'Date Table'[day name] ),
'Date Table'[week] = 9
)
)
VAR BL =
CALCULATE ( ( wk7 + WK8 + WK9 ) / 3 )
RETURN
DIVIDE ( [Volume] - BL, BL, 0 )
2. Then we need to add two slicer, one controls week number, another controls week day name.
The result like this,
If it doesn’t meet your requirement, could you please show the exact expected result based on the table that we have shared?
BTW, pbix as attached.
Best regards,
Community Support Team _ zhenbw
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.