Forum Discussion
Anonymous
6 years agoNot applicable
Calculate Previous Months Aggregate Amount
Hi, I need to add all the amounts of the orders in previous months to the first week of the selected month (in the slicer). Thanks in advance
- 6 years ago
Hi Anonymous ,
I have created sample for your reference.
Measure = var sle = MIN('Table'[Date]) var pre = CALCULATE(SUM('Table'[value]),FILTER(ALL('Table'),'Table'[Date]< sle)) return pre+ CALCULATE(SUM('Table'[value]),FILTER('Table','Table'[week] = MIN('Table'[week])))Pbix as attached.
v-frfei-msft
6 years agoCommunity Support
Hi Anonymous ,
I have created sample for your reference.
Measure = var sle = MIN('Table'[Date])
var pre = CALCULATE(SUM('Table'[value]),FILTER(ALL('Table'),'Table'[Date]< sle))
return
pre+ CALCULATE(SUM('Table'[value]),FILTER('Table','Table'[week] = MIN('Table'[week])))
Pbix as attached.