Forum Discussion
YTD in Rolling13 months
- 7 years ago
Hi ryan0521
How about this measure
Measure = SUMX FILTER ( ALLSELECTED ( 'date table' ), 'date table'[Date] <= MAX ( 'date table'[Date] ) && DATEDIFF ( 'date table'[Date], MAX ( 'date table'[Date] ), MONTH ) < 13 ) [Measure you want to sum] )Best Regards
MaggieCommunity Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi ryan0521
Create a measure
Measure =
CALCULATE (
SUM ( 'main table'[value] ),
FILTER (
ALLSELECTED ( 'date table' ),
'date table'[Date] <= MAX ( 'date table'[Date] )
&& DATEDIFF ( 'date table'[Date], MAX ( 'date table'[Date] ), MONTH ) < 13
)
)
Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
It's not working brother v-juanli-msft, The value that I am summing is a result of a Measure,
"CALCULATE('Income Periodical'[ValueSelected],DATESINPERIOD(Periods[Date],MAX(Periods[Date]),-13,MONTH))"
The result from the formula above is the value I want to sum up.
- v-juanli-msft7 years agoCommunity Support
Hi ryan0521
How about this measure
Measure = SUMX FILTER ( ALLSELECTED ( 'date table' ), 'date table'[Date] <= MAX ( 'date table'[Date] ) && DATEDIFF ( 'date table'[Date], MAX ( 'date table'[Date] ), MONTH ) < 13 ) [Measure you want to sum] )Best Regards
MaggieCommunity Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.