Forum Discussion
gdelvecchio
7 years agoRegular Visitor
Can't filter a table before calculating Average
Average Account Life 2:= AVERAGEX ( FILTER ( 'Facts', [Close Date] > [Open Date]), DATEDIFF([Open Date], [Close Date], MONTH)) The measure above gives me an error saying the DA...
- 7 years ago
Hi gdelvecchio,
One sample for your refernce. Using the fomula as below, everything worked well.
Measure = AVERAGEX(FILTER(Facts,Facts[Open Date]<Facts[Close Date]),DATEDIFF(Facts[Open Date],Facts[Close Date],MONTH))
For more details, please check the pbix as attached.
Regards,
Frank
Anonymous
7 years agoNot applicable
Try to work with following formula
Measure = AVERAGEX(FILTER(Facts,
Facts[Open Date] < Facts[Close Date]),
DATEDIFF(Facts[Open Date],
Facts[Close Date], MONTH))
Hop it will give correct answer.