

July 16, 2010

Hi Andy,
This is a common problem with Pivot Charts. You would need to set the items in the Slicers to 'show items with no values' so they are always present in the chart, which probably isn't what you want.
When you filter a chart the chart adapts to the data in the PivotTable. If the data applicable to the line or columns is removed from the PivotTable then the chart cannot remember those settings when the data appears again as a result of another change in the Slicer.
If keeping all items visible in the chart at all times isn't an option, you might prefer to build a regular chart from the PivotTable data.
Mynda

Dashboards
Power Query

October 28, 2021

Thanks Mynda,
Would it be possible to have a macro that runs after the pivot table data is changed by slicer to modify the chart layout?
I have attempted a few bits of vba code but I can't get it working using … Private Sub Worksheet_PivotTableUpdate(ByVal Target As PivotTable).
Andy
2 Guest(s)
