2

I am trying to create a PivotChart in the form of a bar chart and I would like to add a group average line on the chart.

I have this (sample) table in my PowerPivot Data Model:

Table1

Group averages are A: 20, B: 50 and C: 80. My bar chart looks like this. Bar chart

How would I do this? Do I need to add a measure? If so, how? I am not that great with DAX functions yet.

dreamerboy
  • 23
  • 3

1 Answers1

0

While I am not sure this is what you are looking for, here is what I think you are asking.

First, you are going to need an additional column. Two ways to get er done.

  1. Calculated column

    =CALCULATE ( AVERAGE ( Range[Value] ), FILTER ( ALLSELECTED ( Range ), Range[Group] = EARLIER ( Range[Group] ) ) )

  2. Measure

    =CALCULATE ( AVERAGE ( Range[Value] ), FILTER ( ALLSELECTED ( Range ), Range[Group] = MAX( Range[Group] ) ) )

Now edit your pivot table:

Pivot table fileds set up

Now select your chart type:

change chart type image

For future reference you should look into Power BI. It has features which do these sorts of calculations automatically.

If your looking for something different it would help is you provided the expected outcome.

grldsndrs
  • 567
  • 4
  • 11