Forum Discussion
MxJ
7 years agoFrequent Visitor
Rolling year based on index
Hi All, I am trying to create a rolling year (sum of retail of last 12 months) based on index (NOT on date, I don't have dates like in the example!) for each location seperate but haven't quite g...
v-chuncz-msft
Community Support
7 years agoMxJ ,
You may add FILTER Function to the formula.
https://www.sqlbi.com/articles/filter-arguments-in-calculate/
- MxJ7 years agoFrequent Visitor
Thanks for your response! Unfortunatly I am not getting it to work with filter..
Rolling Year Index = MAX('Retail'[Index])-12 Rolling Year retail= CALCULATE(sum('Retail'[Value]);FILTER(ALL('Retail'[Index]);'Retail'[Index]>[Rolling Year Index]))It just sums everything, also before the last 12 months. Am I doing something wrong?