Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

Average for column and rows

Hello all,

 

I've got a matrix of data. What I would like to do in a perfect world is have each month show the units that the individual accumulated, have the column total show the average per person in that month, and have the row total show the average per month for that person. I can get one or the other with the two measures I've come up with so far but having issues getting both to happen at the same time. The other thing I would like to be able to do is have that 12,648.64 in the AvgUnits column as that is acting as a sort of grand total be the average of all months per person (average of each persons average monthly total). I'm not having any luck sifting thru different forums to find similar questions either. Any help is appreciated!

 

AvgUnits = 
if(isblank([Hours Worked]),blank(),
averagex('DataTable',SUM('DataTable'[IUWUnitValue])/DISTINCTCOUNT('DataTable'[Month])))

OtherUnits = 
if(isblank([Hours Worked]),blank(),
sum('DataTable'[IUWUnitValue])/DISTINCTCOUNT('DataTable'[CommonID]))

 

  • Anonymous ,

     

    So currently the Y-axis "Total" and [AbgUnits] works well and you want to add one row in botton to show the average per person in that month, right?  I'm afraid this may not be achieved, the new column/measure which is added to the matrix will show in Y-axis. As a workaround, I would suggest you to create an additional matrix visual and change the X-axis and Y-axis.

     

    Community Support Team _ Jimmy Tao

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

1 Reply

  • v-yuta-msft's avatar
    v-yuta-msft
    Community Support

    Anonymous ,

     

    So currently the Y-axis "Total" and [AbgUnits] works well and you want to add one row in botton to show the average per person in that month, right?  I'm afraid this may not be achieved, the new column/measure which is added to the matrix will show in Y-axis. As a workaround, I would suggest you to create an additional matrix visual and change the X-axis and Y-axis.

     

    Community Support Team _ Jimmy Tao

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.