Forum Discussion

Peavey's avatar
Peavey
Helper III
6 years ago
Solved

Matrix visual - add column for average

Hi,   Is there a way to add a column in a matrix with average values in addition to totals?   Thanks,  /A
  • Icey's avatar
    Icey
    6 years ago

    Hi Peavey ,

     

    It means that you could change the default Total value in Matrix visual to any aggregation value you want. For example, change Total to Avg.

    Measure =
    IF (
        HASONEFILTER ( 'Table'[Index] ),
        SUM ( 'Table'[Value] ),
        AVERAGE ( 'Table'[Value] )
    )
    

     

     

    Best Regards,

    Icey

     

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

  • Icey's avatar
    Icey
    6 years ago

    Hi Peavey ,

     

    Try this:

    Measure =
    IF (
        HASONEFILTER ( 'Table'[Index] ),
        SUM ( 'Table'[Value] ),
        AVERAGEX (
            SUMMARIZE (
                'Table',
                'Table'[Asset],
                'Table'[Index],
                "Sum_", SUM ( 'Table'[Value] )
            ),
            [Sum_]
        )
    )
    

     

    Best Regards,

    Icey

     

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