Forum Discussion
Anonymous
2 years agoNot applicable
Average Calculation for the over due amount
Hi All,
I am calculating the average for Owed_amt column but the average should be calculated for 12 months.
if data is available for 7 months then average will be calculated for 7 months
im not getting output correctly why??
Tables: Receivables, Master_Calender
Measure
AVG = CALCULATE(SUM(Receivables[OWED_AMT]),ALL(Master_Calender))/MAX([ZMONTH])
1 Reply
- amitchandak
Super User
Anonymous , try measure like
Averagex(Values(Date[Month Year]) , CALCULATE(SUM(Receivables[OWED_AMT]))
or
12 Month Avg = CALCULATE(AverageX(Values('Date'[MONTH Year]),calculate(Sum(Receivables[OWED_AMT])))
,DATESINPERIOD('Date'[Date ],MAX('Date'[Date ]),-12,MONTH))Asummed that you are using date table join with date of your table