James has attended:
Excel VBA Intro Intermediate course
Excel VBA Advanced course
Pivot Chart Report Filter
Hello
i have inserted a pivot chart (chart with a pivot table as the source data) and have set "Strategy" as a report filter.
is it possible to interact with this filter via VBA? specifically to infer/read which items in the filter are selected?
thanks in advance
James
RE: Pivot Chart Report Filter
Hello James,
Hope you enjoyed your Microsoft VBA courses with Best STL.
Thank you for your question regarding viewing the selected items from the Report Filter in a PivotChart.
I'm not sure whether your PivotChart is on the same sheet as the PivotTable or on its own sheet. If the PivotChart is on the same sheet as the PivotTable then all you have to do is insert a slicer for the Strategy field. When you then select items from the slicer they will be highlighted in a darker colour. Place the slicer next to the PivotChart. However, if you want the selected items to actually show on the PivotChart itself wherever it may have been placed, then simply drag the Strategy field from the Report Filter section to the Row Labels section only after the filter selection has been made. I would place this above all other fields in the Row Labels section. This will produce a new axis level showing only the filtered items from your strategy field.
Most things can be done using VBA code but I don't think in this case it is necessary.
I hope this resolves your question. If it has, please mark this question as resolved.
If you require further assistance, please reply to this post. Or perhaps you have another Microsoft Office question?
Have a great day.
Regards,
Rodney
Microsoft Office Specialist Trainer