Script for pivot table

3 posts / 0 new
Last post
padmathiagarajan
Offline
Joined: 07/02/2016 - 06:26
Script for pivot table

Hi Brian,
i created a script for pivot table results.
1.  I dont want the subtotals to appear in the pivot. Is there a way to include this in the script itself? Right now i need to manually right click and give remove field.
2. I may run the script multiple times over a period. I do not want a new pivot table result to be created everytime but it should be replacing the existing one. But this is not happening.
 
Could you please help.
 
Regards
Padma T

Brian Element's picture
Brian Element
Offline
Joined: 07/11/2012 - 19:57

Hi Padma,

There is no way that I know of to remove the subtotals with script.  If there is a way it isn't documented. 

If you don't want it to create a new result you probably want to delete the old result before running the script.  You can add this line and it will get rid of the old result.

db.DeleteResultByName "MyResult"

Hope that helps.


Brian

padmathiagarajan
Offline
Joined: 07/02/2016 - 06:26

Thanks Brian.