Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

Not applicable

Macro to switch accumulation / no accum

is it possible to switch this option in a graph by a macro?

Please can somebody point me in the right direction

1 Solution

Accepted Solutions
jsn
Not applicable

Macro to switch accumulation / no accum

Hello Jochem,

Certainly. Here's the example from the API guide for Accumulate which is found under the expression properties:

set chart = ActiveDocument.Sheets("Main").CreateComboChart
chart.AddDimension "ProductType"
chart.AddExpression "sum(Amount)"
chart.AddExpression "count(Customer)"
set p = chart.GetProperties
p.Expressions.Item(1).Item(0).Data.ExpressionData.Accumulate = 1
chart.SetProperties p

The Accumulate member takes one value which can be:
0 = no accumulation
1 = full accumulation
n = accumulation n steps back

2 Replies
jsn
Not applicable

Macro to switch accumulation / no accum

Hello Jochem,

Certainly. Here's the example from the API guide for Accumulate which is found under the expression properties:

set chart = ActiveDocument.Sheets("Main").CreateComboChart
chart.AddDimension "ProductType"
chart.AddExpression "sum(Amount)"
chart.AddExpression "count(Customer)"
set p = chart.GetProperties
p.Expressions.Item(1).Item(0).Data.ExpressionData.Accumulate = 1
chart.SetProperties p

The Accumulate member takes one value which can be:
0 = no accumulation
1 = full accumulation
n = accumulation n steps back

Not applicable

Macro to switch accumulation / no accum

Thnx Johannes!