Forum Discussion

commonsenseuser's avatar
6 years ago
Solved

Calculate average value in a matrix hierarchy

Hi all,   I have a matrix which shows March Sales % and Jan-Mar Sales % in a column. There are 3 headers in the matrix: Top 15 Products, Sales Growing Products and Others. I want to calculate the a...
  • MFelix's avatar
    6 years ago

    Hi commonsenseuser ,

     

    You need to create a measure similar to this one:

     

    Measre average on totla =
    IF (
        HASONEVALUE ( Table[Product] );
        [March Sales %];
        AVERAGEX (
            FILTER (
                SUMMARIZE ( 'Table'; 'Table'[Product]; "@Sales_percentage"; [March Sales %] );
                [@Sales_percentage] > 1
            );
            [March Sales %]
        )
    )

     

    Be aware that this measure may need adjustments.