Forum Discussion

Gattinomio's avatar
Gattinomio
Icon for Helper I rankHelper I
2 years ago

Average and Percentage Change

Hi everyone,

 

I am trying to calculate the average of the values within a specific category and to then calculate the percentage change from the average for each of these values . For this post, I used fruits as an example as you can see below.

 

 

The "Current Average Calculation" in blue is what I am currently getting with the following formula:

# Total Average by Fruits =
AVERAGEX(
        KEEPFILTERS(VALUES(Products[Fruits])),
        CALCULATE([Volume]))

The outcome is correct but the problem is that I would like to have the overall average displayed on each row (Desired Average Calculation) instead to then be able to calculate the percentage change.

 

As a side note, the fruits category is selected in the filter panel and it applies for the whole page but there are also some slicers on the dashboard. I would like these calculations to adjust accordingly to the filters selected in the slicers.

 

Many thanks in advance for your input.

Any suggestion would be really appreciated.

1 Reply

  • Anonymous's avatar
    Anonymous
    Not applicable

    HI Gattinomio,

    It sounds like a common requirement about use measure expression to calculate with multiple aggregations, I'd like to suggest you refer to greg's blog to know more about and how to handle these:

    Measure Totals, The Final Word 

    Regards,

    Xiaoxin Sheng