Forum

Time issue in chart...
 
Notifications
Clear all

Time issue in chart but not in table

10 Posts
2 Users
0 Reactions
90 Views
Anders Sehlstedt
(@sehlsan)
Posts: 972
Prominent Member
Topic starter
 

Hello,

I have stumbled onto a strange issue when trying to show the average time difference using a clustered column chart.
As you can see in the attached picture the pivot table is showing an average time difference of 9 days 22 hours and 55 minutes, while the cart shows 8 days 22 hours and 55 minutes. For some reason 24 hours are just gone in the chart.

Capture.PNG

What I wonder is why this happens and of course, if there is a solution to fix this.
As it is now I am forced to show the table in my dashboard instead of the chart.

Br,
Anders

 
Posted : 31/07/2017 12:43 pm
(@mynda)
Posts: 4762
Member Admin
 

Hi Anders,

That's odd, but then so is the starting point of the vertical axis.

Can you please share your file, or if it contains confidential information please provide a cleaned sample file so we can see the error and all of the contributing factors. There's not much I can tell from the screenshot, other than it clearly looks wrong 🙂

Thanks,

Mynda

 
Posted : 31/07/2017 7:36 pm
Anders Sehlstedt
(@sehlsan)
Posts: 972
Prominent Member
Topic starter
 

Hello,

I have created an example file containing the data for showing this problem.

As you can see in the example file the data value is showing correct if I choose to not to format it, but the number series alone does not tell any good information so I format the data to d "days" hh "hours" mm "minutes". That works fine in the table, but not in the chart.

Either it is a bug or there is a solution for this behaviour.

Br,
Anders Sehlstedt

 
Posted : 01/08/2017 6:35 am
(@mynda)
Posts: 4762
Member Admin
 

Hi Anders,

Thanks for sharing the file. There appears to be a limitation on PivotTables displaying day duration with hours and minutes in the one format.

You can either display cumulative hours and minutes ([h] "Hours" mm "Minutes"), or if you have Excel 2013 or 2016 then you can use the 'Show Values From Cells' in your labels and with some reformatting of your PivotTable you can simply reference the PivotTable cells for the labels.

The attached file has both options.

Mynda

 
Posted : 01/08/2017 9:47 pm
Anders Sehlstedt
(@sehlsan)
Posts: 972
Prominent Member
Topic starter
 

Hello,

Thank you Mynda. Yes, by skipping the days in the formatting and only have hours and minutes I get correct values in the chart, but it is a huge difference to read the value as 53 hours and 33 minutes compared to read it as 2 days 5 hours and 33 minutes.

Perhaps this "error" is fixed in later updates, it is after all showing correct in the table.

Using the "Value from Cells" option is not an option for me, as the table is dynamic and grows and shrinks in number of rows. To get correct labels using this option you need a fixed table. At least to my understanding. I will however play around and test this option a bit more, as I normally avoid using this option I am not that familiar with what you can and can't do with it.

I appreciate that you have taken your time to check this out and as you state, there seems to be a limitiation in at least the PivotCharts displaying day duration.

Br,
Anders

 
Posted : 02/08/2017 10:08 am
(@mynda)
Posts: 4762
Member Admin
 

Hi Anders,

I agree it's not an ideal workaround. I've asked my MVP community and raised it with Microsoft. I'll let you know if I get a helpful response.

Mynda

 
Posted : 02/08/2017 9:09 pm
(@mynda)
Posts: 4762
Member Admin
 

Hi Anders,

Fellow Excel MVP, Jon Peltier, discovered that regular charts correctly display the custom day format in both the axis and labels.

So, I recommend you use a regular chart instead of a PivotChart. You can still use your PivotTable as the source data by setting up dynamic named ranges to pick up the PivotTable data, as described here: https://www.myonlinetraininghub.com/create-regular-excel-charts-from-pivottables

Mynda

 
Posted : 03/08/2017 10:11 pm
Anders Sehlstedt
(@sehlsan)
Posts: 972
Prominent Member
Topic starter
 

Hello Mynda,

Thank you for the updates. Please also send my thanks to Jon.

It works very nice with a regular chart combined with dynamic named ranges. Not only have I now a good, if not even a great workaround for this issue, I have also learned how to create a dynamic named range and using Index function in a way I didn't expect it could be used.

Let's also hope that this formatting issue with PivotCharts gets resolved in the near future. When I for example opened the workbook in Excel for Mac (O365) it showed correct formatted values.

Br,
Anders

 
Posted : 05/08/2017 3:25 am
(@mynda)
Posts: 4762
Member Admin
 

Will do 🙂

Typical that for once there's something Excel for Windows won't do, that the Mac will!

Glad you liked the INDEX solution for dynamic named ranges. You obviously haven't come across that tutorial in the dashboard course yet.

 
Posted : 05/08/2017 5:39 am
Anders Sehlstedt
(@sehlsan)
Posts: 972
Prominent Member
Topic starter
 

Ha ha, you got me there.Smile

I work either with tables or PivotTables in Excel, so I usually don't need to use named ranges. But as this issue has shown, even so it is usable to use named ranges. So I will definitly re-check the lesson 5 sessions.

 
Posted : 05/08/2017 1:56 pm
Share: