Forum Discussion

MartynasBI's avatar
MartynasBI
Frequent Visitor
3 years ago
Solved

adding an average measure to a chart with existing column variables

Hi,

 

I have the following area chart visual, which contains a legend of two variables (CLO A and CLO B).

 

I would like to calculate the average value of the CLO A and CLO B, and add that average to the area chart as the "average CLO" - which would be a third area line in the chart.

 

Here is the data used

 

Many thanks in advance

 

 

  • v-zhangti's avatar
    v-zhangti
    3 years ago

    Hi, MartynasBI 

     

    You can try the following methods.

    Column:

    Average = AVERAGEX(FILTER('Table',[Revenue growth]=EARLIER('Table'[Revenue growth])),[Nr of companies])

    Is this the result you expect?

     

    Best Regards,

    Community Support Team _Charlotte

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

     

7 Replies

  • kpost's avatar
    kpost
    Icon for Solution Sage rankSolution Sage

    Does this work?  (The paren

    AVERAGE_BY_REVENUE% =
    CALCULATE(

           AVERAGEX(
                  VALUES(Table[Revenue Growth']),
                  COALESCE(SUM(Table['Nr of companies']), 0)
                            )
    ALL(Table[CLO Name])
    )

    //Mediocre Power BI Advice, but it's free//
  • kpost's avatar
    kpost
    Icon for Solution Sage rankSolution Sage

    Does this work?

    AVERAGE_BY_REVENUE% =
    CALCULATE(

           AVERAGEX(
                  VALUES(Table[Revenue Growth']),
                  COALESCE(SUM(Table['Nr of companies']), 0)
                            )
    ALL(Table[CLO Name])
    )

    //Mediocre Power BI Advice, but it's free//