Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

How to get total as sum and average

Hi ,

 

In Power BI Matrix visual i want to get Col1 Total as SUM(Col1) and AVGCol2 as Avergae of the Column total meaning (AVG(Row1:Row3)). How can i achieve this?

 

 Col1AVGCol2
Row11019.72
Row2910.18
Row3631.69
TOTAL2520.53

 

  • Anonymous's avatar
    Anonymous
    5 years ago

    Hi Anonymous 

    Firstly you need to add a "Row Index" in your data model. We need to add it into Matrix Row Field.

    Then add Col1 and Col2 into Matrix Value Field. We can use SUM and AVERAGE Function in Value Field.

    My Sample:

    SUM and AVERAGE Function in Value Field

    Matrix:

    Best Regards,

    Rico Zhou

     

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

     

     

1 Reply

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Anonymous 

    Firstly you need to add a "Row Index" in your data model. We need to add it into Matrix Row Field.

    Then add Col1 and Col2 into Matrix Value Field. We can use SUM and AVERAGE Function in Value Field.

    My Sample:

    SUM and AVERAGE Function in Value Field

    Matrix:

    Best Regards,

    Rico Zhou

     

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