First time poster, long time beneficiary of this forum 
I am fairly new to VBA coding, but consider myself a pretty advanced Excel user.
On to the area I need some help with. I have created a sales dashboard with various charts and metrics that is controlled via slicer panels. There are two slicer panels, "Month" and "Period View" that allow the user to see the dashboard in different ways. The "Period View" slicer allows selection of either a rolling Year To Date view (a cumulative rolling sum of current plus prior months) or Month discrete (no running total). These work fine on the dashboard, however, I also have another worksheet that contains a pivot table controlled by these slicers. The issue is that if the user selects Year To Date on the slicer, the pivot table sums the rolling total of each month, thus giving a compounded total.
The solution I am looking for is some code to automatically change the way the pivot table calculates the "Show Values As" setting based on whether the user chooses YTD or Month Discrete. If the user chooses "Month Discrete" then the calculation setting is "Normal." If the user chooses "Year To Date" the calculation auto changes to "Running Total In..."
Is this possible? I sincerely appreciate your help, I have spent a great deal of time researching and experimenting with no luck yet.
EDIT
Also posted here https://www.excelforum.com/excel-pr...lculations-as-normal-or-running-total-in.html

I am fairly new to VBA coding, but consider myself a pretty advanced Excel user.
On to the area I need some help with. I have created a sales dashboard with various charts and metrics that is controlled via slicer panels. There are two slicer panels, "Month" and "Period View" that allow the user to see the dashboard in different ways. The "Period View" slicer allows selection of either a rolling Year To Date view (a cumulative rolling sum of current plus prior months) or Month discrete (no running total). These work fine on the dashboard, however, I also have another worksheet that contains a pivot table controlled by these slicers. The issue is that if the user selects Year To Date on the slicer, the pivot table sums the rolling total of each month, thus giving a compounded total.
The solution I am looking for is some code to automatically change the way the pivot table calculates the "Show Values As" setting based on whether the user chooses YTD or Month Discrete. If the user chooses "Month Discrete" then the calculation setting is "Normal." If the user chooses "Year To Date" the calculation auto changes to "Running Total In..."
Is this possible? I sincerely appreciate your help, I have spent a great deal of time researching and experimenting with no luck yet.
EDIT
Also posted here https://www.excelforum.com/excel-pr...lculations-as-normal-or-running-total-in.html
Last edited by a moderator: