Forum Discussion
Rolling 12month sum
- 4 years ago
Hi StevenCollins ,
According to your description, you want to calculate sum value of the rolling 12 months based on the date you selected in the slicer, but the formula only take the selected month into calculation, you should use the removefilters
function in the formula.
I create a sample.
Modify the measure formula like this:
Measure = CALCULATE ( SUM ( Combined[Sales History (Value)] ), DATESINPERIOD ( 'Combined'[Date], MAX ( Combined[Date] ), -12, MONTH ), REMOVEFILTERS ( Combined[Report Month] ) )Use the Report Month column in the slicer and get the correct result.
I attach my sample below for your reference.
Best Regards,
Community Support Team _ kalyjIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi StevenCollins ,
According to your description, you want to calculate sum value of the rolling 12 months based on the date you selected in the slicer, but the formula only take the selected month into calculation, you should use the removefilters
function in the formula.
I create a sample.
Modify the measure formula like this:
Measure =
CALCULATE (
SUM ( Combined[Sales History (Value)] ),
DATESINPERIOD ( 'Combined'[Date], MAX ( Combined[Date] ), -12, MONTH ),
REMOVEFILTERS ( Combined[Report Month] )
)
Use the Report Month column in the slicer and get the correct result.
I attach my sample below for your reference.
Best Regards,
Community Support Team _ kalyj
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thank you, that worked perfectly