Forum Discussion
bgonen7
Helper I
3 years agoDivide formula filtering through specific time periods
I have the formula below that works fine when I check the filter : "Revised cleared periods"
the formula goes like this:
Avg Receipts =
DIVIDE( SUMX('Open AR',[$Group amount]*[Arrears]),SUM([AMOUNT_GROUP_CURR]))
All I am trying to do is to add to this formula to filter through most recent 3 months of the column "Revised cleared periods" from the Table: 'Open AR'
2 Replies
- amitchandak
Super User
bgonen7 , You need create a measure like
example
3 Months=
var _max = maxx(allselected(date),date[date]) // or today()
var _min = date(year(_max), month(_max)-3,1)
return
CALCULATE([Avg Receipts],filter(date, date[date] <=_max && date[date] >=_min)) - bgonen7
Helper I
Thanks for the quick response.
var _max showed no errors but when integrating with var _min it reflected an error.
Anyway, I got an alternate solution (but I might go back to your solution at some point).