Excel Pivot chart clears Data Labels when refreshed - excel

I have two identical Pivot Charts (same chart template) on two different data sources. When I hit refresh all both have new data, first one with retained formatting and the second one is missing data labels (usually not all of them but randomly 1 or 2 sets out of 3 total data series). I don't want to mess the file with macros for chart formatting as all but one work just fine.
Does anyone have any idea why there's such behavior? I have checked the options on both carths and are identical.
All help is appreciated.

Related

Excel Line Chart with separate data points for a single line

I have a weird problem that google's not being too kind on results (mostly basic things on how to create a line chart, or combination charts, neither of which I'm after).
I'm trying to automate a report we do each month, I've managed pretty well so far by having a linked excel chart and objects, I have a single sheet in excel I paste my formatted data (set format is consistent each month) then excel picks out the data, creates the charts and when opening powerpoint it reads it all in from there.
Great! Until I was given a new piece of information, there's monthly data and a yearly tally in my data, monthly data is shown with a particular "weighting" applied, year with a different one and it's this that's caused a problem.
The package that's exporting the data can't show these figures contiguously, so we have an export with all the monthly weights, then with annual weights.
So say originally we were looking at C83 to O83 for our data for this year, we're now looking at C83 to N83 and O1364.
I've tried to look at how I would add this to the chart, which currently has the reference:
='Monthly Data to Update'!$C$83:$O$83
But doing anything + or & doesn't seem to work.
So, I decided to just pull all my data in to contiguous set to reference, (so ='Monthly Data to Update'!C83 one cell, ='Monthly Data to Update'!C84 next cell and so on).
This caused a problem for future months that're empty, having 0's in them, so I updated my code to check:
=IF('Monthly Data to Update'!C83=0,NA(),'Monthly Data to Update'!C83)
And this works, my table below my chart is blank for the empty months, my chart doesn't try and plot these empty months. Hurrah!
Now, the wrinkle. The Yearly nets aren't charted but are displayed in the table (I'm not up on Excel charts so how this was originally setup, I just copied the charts from Powerpoint in to Excel and reset the data to where it needed to be before copying it back to Powerpoint as a data linked chart).
First chart I did, works fine, second chart I did it's decided to start plotting the annual net for two of the three lines = \
So, this is how my chart looks like, running off the contiguous (but wrong) data:
And this is how it looks running off the fetched contiguous (correct) data:
It's really baffling, Exceeded and Met now plot the Year to Date figure, whereas Not Met behaves as it should, and they all have the same data layout (on the right) using the same formulas (just pointing at different cells).
I am confused..
I'm hoping to keep this light and simple so have avoided using any macro's to date, so that down the line when I hand this project over to someone any maintenance should be easy to do (say add a chart) without them asking me and me then having to remember what the hell I did a few months ago.. - so if this is doable without going down that line (which, seems like it should be, given my first chart the two lines there worked fine, and one of the three in this is behaving itself).
Apologies for the long winded description, I've given full history so if there's a step further back I could've done better, then happy to fix it up there rather than where I got to.
Ah, so apparently I could've had non-contiguous data with a comma, not a plus or ampersand, so the chart data would be:
=('Monthly Data to Update'!$C$83:$N$83,'Monthly Data to Update'!$O$1404)
So I don't need to rebuild the data in to a contiguous set, and my charts don't cock up when selecting the data this way, win's all around.
Thank you for your time, hopefully this helps someone in the future. (as a saving grace for my lost morning)

EPPLUS - Charts not updating after table grows

I have an Excel file with a table and several charts created from data in the table. I need the charts to take any new data when the table grows. It works fine if I work from Excel, obviously (i.e. when I add a new row, the charts make room for the new data and when the numbers are added, the charts show the changes).
But I need to do it programmatically with Epplus. I've managed to add a row to the table and have it update all the formulae in it properly, but the charts are not updated.
Any idea of why this is? Is it a known limitation of EPPlus?
Or do I have to traverse all the charts and update the data series for each?

Excel - slicers copying each other

I have an Excel spreadsheet which is split down the middle and mirrored on the other side so I do comparisons. I have the same slicers on both sides but when I change one slicer the other changes too. Is there a way to make the slicers independent from each other? When you change the Report Connections on one slicer this is also copied on the other one. I have two pivot tables which are showing the same data but I just want to slice them differently.
I have now duplicated my raw data as a workaround but this seems unnecessary to do.
I suspect what has happened is that at some stage you connected both Slicers to both Pivots. When this happens, Excel then forever treats both Slicers as just one, and you can't separate them again so that they point at different Pivots. I blogged about this some time back at the following link:
http://dailydoseofexcel.com/archives/2014/08/05/slicers-and-slicercaches/
If this is the case, all you need to do is delete one of the Slicers, and create a new one on the other PivotTable.

Pivot chart (Excel) fails to render the data the way I want

I'm creating a piece of Java code to fill data into an excel file. The file is pre-created, inlcuding a pivot chart and some vba code.
Though the java code works, I have some problems getting the pivot chart itself to work. I've included a screenshot with some demodata.
There are several Problems I'd like to solve:
The X-Achis seems to behave like a category-axis, though it is formatted as a date-axis.
Symptoms:
Dates are not ordered automatically, but only if I order the according column in the pivot-table
All dates have the same distance, though there is a gap of 1.5 years in the data
The chartline of cathy has a gap. But i do want the line rendered, even if there are dates without data for cathy
Am I using the wrong chart, did I miss the an important checkbox in the chart options or do I really have to interpolate the data programmatically for every day before filling it into the table?
The last option would be not only be disappointing, but also distort the chart since I want to have the datapoints marked with symbols (like the squares and diamonds on the screenshot)
Any help is appreciated.
Edit
By now this is my solution:
First of all: pivot charts are great, unless you want to visualize randomly ordered dates
I'm going to copy the pivot-data via vba into another sheet and use a regular chart
Gaps in the chartline can be avoided by using a point-diagram (X/Y-data) and selecting "connect datapoints with line" in the Dialog in "datasource > hidden and empty cells" (roughly translated from the german locale)
The vba-code will be extended to set up the diagram to my needs (adjusting range of input data and so on)
Still I'm kind of disappointed. I would have thought this was a usual usecase.
I set up trial workbook.
I based a line chart on a range of data that had a column of dates.
It was NOT pivot chart, just an ordinary one
When I went to the x-axis formatting options and chose "Date axis" I was presented with choices about how to span the dates out (to do what you want).
When I created a chart based on a pivot table using the same data, the x-axis formatting options did not give me the same choices
It would seem that pivot charts do not allow dates to be spanned out.
So you might like to consider basing your chart on a range of data not a pivot table.
I also found this useful page, all about this sort of thing:
here
Harvey

Create Multiple 'PivotCharts' on One 'PivotTable'

Within my Excel Spreadsheet I have a PivotTable which is based on data retrieved from a SQL query.
The PivotTable is made up of a series of customers, each with their own stock value.
I made a PivotChart, but as there are many customers, the lines on the Chart are unreadable.
I want to make an individual chart for each customer, however when I filter on one customer, every chart filters on that customer - not allowing me to do one chart for each
Is there a way around this?
After investigation, adding more than one PivotChart distorted the layout of the underlying data.
Therefore it is necessary to read the same data into the Excel spreadsheet twice to have a second PivotChart.

Resources