Forum Discussion
dp32
Helper I
6 years agoFilter year/quarter in a calculation
I want to filter the current years quarter in a calculation. Currently I am using two filters like this: A02 = CALCULATE(A01, FILTER(PT, [PTDate].[Year]=YEAR([ActualDate])), FILTER( PT, [PTDate].[Q...
- 6 years ago
dp32 That looks reasonable to me. Quarters are a pain! 🙂
v-xicai
Community Support
6 years agoHi dp32 ,
You may change your code like below:
A02 =
CALCULATE (
[A01],
FILTER (
PT,
[PTDate].[Year] = YEAR ( [ActualDate] )
&& [PTDate].[QuarterNo] = QUARTER ( [ActualDate] )
)
)
Best Regards,
Amy
Community Support Team _ Amy
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.