Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Trying to figure out how to show and not show partial sums in a pivot table via a macro.
I have a pivot table that allows users to add dimensions and expressions dynamically ( Thanks Orka)
I am going to upload Orka example qvw to work from. Once a user selects their dimensions I would like them to be able to select which dimensions to show the partial sums on.
I have included the start of a new macro called ShowPartialSums. I need some help on how to make this more dynamic.
Thanks
just add this to the macro
| ' Add Partial Sums |
ActiveDocument.GetApplication.WaitForIdle 'wait for QlikView to finish before modifying report
| set selectedExpressions = ActiveDocument.getField("%ExpName").getSelectedValues | ||
| set selectedDimensions = ActiveDocument.getField("%Dimension").getSelectedValues | ||
| selectedExpressionMax = selectedExpressions.Count -1 | ||
| selectedDimensionMax | = selectedDimensions.Count -1 | |
| if selectedExpressionMax > -1 then | ||
| set chartProperties = chart.GetProperties | ||
| for i = 0 to selectedDimensionMax | ||
| chartProperties.dimensions(i).showpartialsums = true | ||
| chart.SetProperties chartProperties | ||
| next | ||
| end if |