Guinaba
Board Regular
- Joined
- Sep 19, 2018
- Messages
- 233
- Office Version
- 2016
- Platform
- Windows
Hi all,
I am trying to replicate the following Excel scenario using DAX:
In Excel I use AverageIF =AVERAGEIF(A$1:A$32,A1,B$1:B$32) to average the col. C. For example, I've highlithed the scenario where Mth#=1, so the forumla move downwards checking each month number 1,2,3,4,etc
I have tried CALCULATE(AVERAGE([Residual]),FILTER(Table[Mth#]=EARLIER(Table[Mth#])) but got the error: Earlier refers to a previous rows context which doesn't exist.
I am trying to replicate the following Excel scenario using DAX:
In Excel I use AverageIF =AVERAGEIF(A$1:A$32,A1,B$1:B$32) to average the col. C. For example, I've highlithed the scenario where Mth#=1, so the forumla move downwards checking each month number 1,2,3,4,etc
I have tried CALCULATE(AVERAGE([Residual]),FILTER(Table[Mth#]=EARLIER(Table[Mth#])) but got the error: Earlier refers to a previous rows context which doesn't exist.