Forum Discussion
Need help creating a dynamic graph from data extracted from a pivot table
Hi experts,
I have hourly data collected from our shared solar system (14 lots). I can get that data into an excel table easily, then use a pivot table to get it summarised by Date-Month.Day (rather than by hour) and Lot. A calculated column in the pivot table gives the percentage ratio of the solar power delivered each day to each lot.
[Sidenote: The solar power is not delivered equally every day, but is demand based with an overall objective of eventually sharing the power equally, where equally depends on the strata lot allocations, so some lots get a different percentage than others. Furthermore, the distribution is split into 3 phases, where a given set of 4 or 5 lots share the same phase]
I've added slicers to the resulting pivot so I can look at each month of data for each phase. [Note that the system went into operation on Nov 22, so the November data is only a few days, beginning Nov 22]
What I'm trying to achieve is to get the data graphed to show the Ratio of Solar Delivered per day per Lot. Something like this, which is fine for Phase 1 for the month of November only:
To create this graph, I used array formulas in some spare cells in the pivot table to tabulate the data like this:
The table extends dynamically as I add months and/or phases to the pivot table display - which is great. Just what I wanted.
BUT...
the graph stays stuck on showing just the first four lots and the first 9 days because that was the size of the table when I grated the graph.
I WANT THE GRAPH TO EXPAND DYNAMICALLY AS THE TABLE EXPANDS
I've tried changing the Chart data range to accommodate the extra data, but if I then change back to a smaller set of data, the graph size does not change. viz- below is how the graph looks after changing the Chart data range to accommodate some extra data, then reduced to the original data set:
I WANT THE GRAPH TO CONTRACT DYNAMICALLY AS THE TABLE CONTRACTS
In other words, when I change the slicers to show the original data set, I want the graph to return to its original format
~------------------------------------------------------------------------------------~
I've read posts that talk about formatting your data as a table. Bit if I try and format by "helper" data as a table, I get the following warning:
If I exclude the calculated headings, I get #SPILL errors
------------------------------------------------------------------------------------
I'm at a loss to work out how to create a dynamic graph. I'm hoping someone in the community can help - good luck and happy new year. And thanks for taking the effort to read this rather long post. If I can figure out how to add my source file to this post, I'll add it. In the meantime, you can view/download my source file here: https://1drv.ms/x/c/c95331b296c5ed04/IQCxxcpJWbyOTIXiDxyvmg9mAS5xcAADjTrP0JXBbs1IHBI?e=JJvVYH
RedNectar
2 Replies
- SergeiBaklanDiamond Contributor
For the chart you may build PivotTable as
with Ratio as
Next add PivotChart, it works dynamically.
- RedNectarBrass Contributor
Thanks SergeiBaklan​ - I think that might be two beers I owe you!
Keep up the good work and best wishes for 2026
RedNectar (aka Chris Welsh)