Forum Discussion
tchen0
8 years agoRegular Visitor
Filters in the Calculation function
Hello, I am new here. I have a measure created below: OP_Act = CALCULATE(sum('OP - Data'[Fcst_Act]), 'OP - Data'[Fcst Type]="Actual", 'OP - Data'[OP_date] < date (2018,5,15) ) Every mont...
- 8 years ago
Hi tchen0,
You just need to create a measure for [Control_Date].
Control_Date = DATE(2018,5,15)
By the way, the correct formula should be:
OP_Act =
CALCULATE (
SUM ( 'OP - Data'[Fcst_Act] ),
FILTER (
'OP - Data',
'OP - Data'[Fcst Type] = "Actual"
&& 'OP - Data'[OP_date] < [Control_Date]
)
)Best regards,
Yuliana Gu
v-yulgu-msft
8 years agoMicrosoft Employee
Hi tchen0,
You just need to create a measure for [Control_Date].
Control_Date = DATE(2018,5,15)
By the way, the correct formula should be:
OP_Act =
CALCULATE (
SUM ( 'OP - Data'[Fcst_Act] ),
FILTER (
'OP - Data',
'OP - Data'[Fcst Type] = "Actual"
&& 'OP - Data'[OP_date] < [Control_Date]
)
)
Best regards,
Yuliana Gu