Guys,
I have a pivot slicer listing 52 different week date filters.
There are some time filter options to provide users with specific totals. "Last 52 Weeks", "Last 26 Weeks", "Last 13 Weeks", "Month to Date", etc.
When a time filter is changed, it is taking about 1.5 minutes to return results (large data set). All I can see are two options in VBA to consider efficient functionality.
One option is to loop through each slicer item and select the weeks applicable to the time filter. However, after each week is selected (using the VBA loop) the pivot updates (takes about 2 seconds each) so the entire process takes far too long to complete. I cannot seem to find a way to stop the pivot updates during the loop process. I've used many different code suggestions to disable the PT update but none of them seemed to work for me. Enable Events=False, Calculation=False, Calculation=xlCalculationManual, ManualUpdate=False.
Another option is to select multiple slicer items at the same time using some type of array along with the slicer item location (1), (2), (3), etc. However, I cannot seem to find any VBA array code that will allow me to use this option.
Can anyone advise of a different option and/or an example of a VBA array that would change multiple slicer items at the same time?
Thanks
I have a pivot slicer listing 52 different week date filters.
There are some time filter options to provide users with specific totals. "Last 52 Weeks", "Last 26 Weeks", "Last 13 Weeks", "Month to Date", etc.
When a time filter is changed, it is taking about 1.5 minutes to return results (large data set). All I can see are two options in VBA to consider efficient functionality.
One option is to loop through each slicer item and select the weeks applicable to the time filter. However, after each week is selected (using the VBA loop) the pivot updates (takes about 2 seconds each) so the entire process takes far too long to complete. I cannot seem to find a way to stop the pivot updates during the loop process. I've used many different code suggestions to disable the PT update but none of them seemed to work for me. Enable Events=False, Calculation=False, Calculation=xlCalculationManual, ManualUpdate=False.
Another option is to select multiple slicer items at the same time using some type of array along with the slicer item location (1), (2), (3), etc. However, I cannot seem to find any VBA array code that will allow me to use this option.
Can anyone advise of a different option and/or an example of a VBA array that would change multiple slicer items at the same time?
Thanks