Forum Discussion
LeaRupnik
Helper III
5 years agocumulative with filter
I have a problem calculating the cumulative. I would like it to be calculated according to the filter, which means that if I chose the month of January, I find it good if I choose the month of Februa...
- 5 years ago
Hi LeaRupnik ,
Try this:
Measure = CALCULATE ( SUM ( 'Table'[Sales] ), DATESBETWEEN ( Dates[Date], DATE ( YEAR ( MAX ( Dates[Date] ) ), 1, 1 ), MAX ( Dates[Date] ) ) )Or this:
Measure = CALCULATE ( SUM ( 'Table'[Sales] ), DATESBETWEEN ( Dates[Date], STARTOFYEAR ( Dates[Date] ), MAX ( Dates[Date] ) ) )Best Regards,
Icey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Icey
Community Support
5 years agoHi LeaRupnik ,
Try this:
Measure =
CALCULATE (
SUM ( 'Table'[Sales] ),
DATESBETWEEN (
Dates[Date],
DATE ( YEAR ( MAX ( Dates[Date] ) ), 1, 1 ),
MAX ( Dates[Date] )
)
)
Or this:
Measure =
CALCULATE (
SUM ( 'Table'[Sales] ),
DATESBETWEEN (
Dates[Date],
STARTOFYEAR ( Dates[Date] ),
MAX ( Dates[Date] )
)
)
Best Regards,
Icey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.