Forum Discussion
nanacobsbs
Helper I
1 year agoAverage Dax
The matrix is shown in Fig and Dax Dommand is bellow. Average = AVERAGE('Test'[Nov]) I would like to display the averaged results on each row, what DAX should I use? I want the total ro...
bhanu_gautam
Super User
1 year agonanacobsbs , Try using
DAX
Average =
IF(
HASONEVALUE('Test'[DATE]),
AVERAGE('Test'[Nov]),
MAXX(ALL('Test'[DATE]), 'Test'[Nov])
)
- nanacobsbs1 year ago
Helper I
Thank you, but it does't work.
I would like to get the following calculation results.
Is it possible?- bhanu_gautam1 year ago
Super User
nanacobsbs Try this one
RunningAverage =
IF(
HASONEVALUE('Test'[DATE]),
CALCULATE(
AVERAGEX(
FILTER(
ALL('Test'[DATE]),
'Test'[DATE] <= MAX('Test'[DATE])
),
'Test'[Nov]
)
),
CALCULATE(
AVERAGEX(
ALL('Test'[DATE]),
'Test'[Nov]
)
)
)- nanacobsbs1 year ago
Helper I
It doesn't work.
Dax command has some error, so I put "SUM" infromt of 'Test'[Nov]