Average Lines on a Pivot Chart

ScottInTexas

Board Regular
Joined
Oct 28, 2003
Messages
167
I have a pivot bar chart showing percentages of events to the total number of events. I want to show a vertical line as an average of one of the event types. Some where in the pivot table I should be able to set the average I want and then some how tell the chart to display this as a line in the chart.

To be more clear. The left side of the chart lists the types of events. Bars strectch to the right to the percentage of that type to the total. The vertical average line would bisect the chart at the average of just the selected event type.

Still not as clear as I would like. But without a picture I can do no better.


Scott
 

Some videos you may like

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"

Andrew Poulsom

MrExcel MVP
Joined
Jul 21, 2002
Messages
73,092
I don't think you will be able to do that because a Pivot Chart can have only one chart type, not mixed chart types like a normal chart.
 

ScottInTexas

Board Regular
Joined
Oct 28, 2003
Messages
167
Thanks Andrew,

I would have to use code to create the chart as I do with another. You can do it with something like this;
Code:
    Charts.Add
    ActiveChart.ApplyCustomType ChartType:=xlBuiltIn, TypeName:="Line - Column"
    ActiveChart.SetSourceData Source:=Sheets("EA Tools").Range("A1:C7")
    ActiveChart.Location Where:=xlLocationAsObject, Name:="Tools"
    With ActiveChart
        .HasTitle = True
        .ChartTitle.Characters.Text = "# Reports vs Events"
    End With
    ActiveChart.HasPivotFields = False

The problem I have is getting a field that shows what I am looking for. I'm not all that clear because it is not all that clear to me.

There weree 96 events for the year. Of those some percentage was from lack of power or some other monitored reason. The cause was from one of four or five causes. What was the average of all events to the one cause called OD?

Thanks for your response.

Scott
Code:
 

Watch MrExcel Video

Forum statistics

Threads
1,122,193
Messages
5,594,774
Members
413,934
Latest member
austinb

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top