Pivot table not updating with new data
Not bad, but our objective is to show only one category, say, Environmental. One of the limitations of a pivot chart is that we can’t plot a subset of the data. Doing this plots each category’s defect data in a different series, so each category is shown in a different format. If we just make a chart from the pivot table, here is the result. Here’s the pivot table from the dynamic chart article. The duplicate columns Main Category and Category were needed in order to have the categories (electrical, mechanical, etc.) in both the row area and column area of the pivot table. The new data appears in the pivot table, but it does not have the conditional formatting rule applied, because it is outside of the original block of cells.
If you are applying conditional formatting to a pivot table, you might need to adjust the settings, to ensure that the correct cells are formatted, after the pivot table changes.
The code to select the environmental category label (series name) is Intersect(Active Sheet.