Excel Pivot Chart add Horizontal and Vertical Lines

bert132

New Member
Joined
Jul 31, 2021
Messages
1
Office Version
  1. 2016
Platform
  1. Windows
So I have tried a couple of things and ran into a couple of problems.
First of all my desired situation:
hW44m.png

I have a Pivot Chart based on data which contains Dates, Values and Locations. (A2A, A4A etc. are locations). I want to have a legend based on the different locations so I can see which line stands for which location. Besides that I also want to use horizontal en vertical lines on specific dates or values.

So what have I tried so far to fix this:

To get the locations in the legend, I put the field "sample location" in the columns section of pivot table. This gives the desired result.
After that, I added a calculated field to the pivot table with the formula: "=9". My plan was to create a column with the value 9 so if I create a Chart I get a vertical line. Instead I got this:
ox9fd.png


As you can see, the pivot table adds the calculated field for every sample location. Which results in a target line per sample location instead of just one target line for all.
So my question here is: How can I add a horizontal (and vertical) line to my pivot chart without giving up on my sample location specification?
 

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.

Forum statistics

Threads
1,224,818
Messages
6,181,151
Members
453,021
Latest member
Justyna P

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
Back
Top