How to culculate "Average" of rows?

Greetings!
Could anyone help me to culculate Average value of columns?
There is a build in method: Add calculated → statistical → Average. But the result looks like this(vertical column with identical values):

Is it possible to get “Average” row like “Total” row?
I’ve spent a lot of time but still can’t figure out how to do it.
Thanks a lot!

Hi @popovsa88

When you add the Add calculated → Statistical → Average column, you can click on the column header and choose the “Edit calculated” option to see and copy the formula used in this calculation.

It should look something like this:

CASE WHEN NOT IsEmpty([Measures].[Diff%]) THEN
  ConstantColumnValue(CatchException(
    Avg(VisibleRowsSet(), [Measures].[Diff%])
  ))
END

Now, edit the formula of your “Diff%” measure to override the calculation of the Total row:

CASE WHEN
[Team].CurrentMember.Name="$total_aggregate"
THEN
ConstantColumnValue(CatchException(
    Avg(VisibleRowsSet(), [Measures].[Diff%])
))
ELSE
-- your Diff% formula goes here
END

Let me know if this fits your use case!
Best regards,
Nauris / eazyBI support

Thanks a lot! That works!