Forum Discussion

newhopepdx's avatar
newhopepdx
Resolver I
3 years ago
Solved

Matrix total not average

Visual is a matrix with Venues as rows and months as columns.  Values are attendance totals. Measure calculates the Average monthly attendance.

AvAtt = AVERAGEX'tblAttendance''tblAttendance'[Attendance] )

 

Cells are accurately reflecting the average attendance for each event in the month (5 in the case of April). The column total (128) is incorrect and should be 512. I know it has to do with averaging averages, but can't find the right DAX formlua.

 

Here's a screen print of the matrix and a spreadsheet showing the raw data and hand calculated values expected...

  • Hi newhopepdx 

    please try

    AvAtt =
    SUMX (
    VALUES ( 'tblAttendance'[Venue] ),
    CALCULATE ( AVERAGE ( 'tblAttendance'[Attendance] ) )
    )

6 Replies