Forum Discussion
Wrong average
- 4 years ago
Anonymous the total of the matrix is not the average of the rows in it. It's the average of the underlying data without filters. You have different number of rows per unit. The total is the weighted average.
If what you want is the average of averages than write this:Measure = AVERAGEX( VALUES(fact_table[Unit]), CALCULATE(AVERAGE(fact_table[Goals])) )In case you put on the rows of the matrix the unit column from the dimension then swith in my function the VALUES(fact_table[Unit]) to VALUES(dim_table[Unit])
Anonymous the total of the matrix is not the average of the rows in it. It's the average of the underlying data without filters. You have different number of rows per unit. The total is the weighted average.
If what you want is the average of averages than write this:
Measure =
AVERAGEX(
VALUES(fact_table[Unit]),
CALCULATE(AVERAGE(fact_table[Goals]))
)
In case you put on the rows of the matrix the unit column from the dimension then swith in my function the VALUES(fact_table[Unit]) to VALUES(dim_table[Unit])
still doesnt work, I used the unit column from fact table
- SpartaBI4 years agoCommunity Champion
Anonymous you didn't put the calculate around the average. Look at the measure I wrote. Don't forget to accept the solution 🙂