Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Matrix Table: Average in Row and Sum in Column Header

Hi everyone,

I have a matrix table, where I calculate the average per row using a measure. But in the column header, I need to sum the average values. 

Here is an example of what I would like to accomplish:

The column M_SumOEE * is a measure with the following formula: 

 

M_SumOee = SUM('FactOee'[Oee])

 

Cells with blue background are summarized per shift because I can have multiple records per shifts. OEE per shift is an absolute percentage value, so I need to sum it.

 

Any idea how I can calculate the average of all summarizes values (blue background) and show the value in the row header (orange background)?

 

Thanks in advance and greetings

 

Michael

10 Replies

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi v-kelly-msft,

       

      I'm sorry for my late reply. Thank you the provided pbix. Unfortunately the measure seems not to work as I expect. I've added an addition row to the table (see red mark below).  

       

       

      That is the result in the table

      Instead of 0.45 (second row, column Average), the value must be 0.9 (0.8 + 0.1). The average value in the header should be 0.74 ((0.9 + 0.78 + 0.55) / 3).

       

      Thanks and regards

       

      Michael

       

       

       

    • Anonymous's avatar
      Anonymous
      Not applicable

      You just offered the answers without asking more!! Excellent!

      Will learn another new skill, appreciate that 🙂

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi mhossain,

       

      I'm not sure how this will solve my problem. How do I get the value only into the Row Header per Group?

       

      Regards

       

      Michael

      • mhossain's avatar
        mhossain
        Solution Sage

        Anonymous 

         

        Suggestion was to calculate your Sum in the calculated column, so you have sum value for Day/Night etc level, now you create just one measure with Avergage aggregation, and in matrix table, subtotal will show Avg, and for Day/Night Avg will be individual numbers which is sum in your calculated column. Hope this makes sense.

        It could have been easier with sample dummy pbix.

  • PaulDBrown's avatar
    PaulDBrown
    Community Champion

    Anonymous 

    Can you please provide a sample dataset or, even better, a sample PBIX file?

    Can you please also clarify the calculations you wish to see for blue and orange highlights?

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hey PaulDBrown,

      thanks for your answer.

      I cannot prvide the pbix, but some addition information you requested. Thats the table where the data comes from.

       

       

      It a simple fact table. Each column which ends with SK, hat a relation to a dimension table. The column Oee and GoodPartAmount are used for calculations.

      Blue = Sum of all OEE values per Machine and Shift

      Orange = Average of all blue cells for that specific machine and all shifts per machine.

      Regards

      Michael