Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Control cyclic group using Button

Is it possible to control a cyclic group using a button other than the standard button inside the chart? If so, how? I would also want to remove the button within the chart.

I have 3 tables on one sheet. Each chart uses a different expression, but that all use the same group to modify the dimension. I want to have a single button that can be pressed to control which group is active on all 3 charts.

Simplified example below:

Buttons:

[By Customer]    [By Product]     [By Region]

Charts:

Chart shows total sales (by either Customer, Product or Region)

Chart shows total hours (by either Customer, Product or Region)

Chart shows total transactions (by either Customer, Product or Region)

1 Solution

Accepted Solutions
Not applicable
Author

6 Replies
Anonymous
Not applicable
Author

Creat three different charts (not cyclic) and use the buttons so that the 'by customer' button restores the customer graph and minimizes the other two and so on for the other two buttons.  In the button properties under 'Actions' click the 'Add' button and choose Layout then Minimize Object or Restore Object

Not applicable
Author

You can use the buttons to set a variable and then reference that variable in the Dimensions' 'Enable Conditional' box. For example, when the variable equals 1, the Dimension will be Customer, when it is 2 it will be Product, etc.

Not applicable
Author

See attached.

Not applicable
Author

I know I could do this (have done it on other occasions), but I am actually dealing with the exact same issue for 30+ charts across all my sheets, so really don't want to have to create 30*3 separate charts when this is what the cyclic charts were designed to do.

jerem1234
Specialist II
Specialist II

To continue contributing options, you can use a variable as a calculated dimension like : $(vCycle)

and then create an action on the button like:

=if(vCycle='Department','Teacher', if(vCycle='Teacher', 'Student', 'Department'))

Please find attached.

Also, you can use a macro like:

Sub Cycle

groups= ActiveDocument.GetGroups

groups(0).Cycle 1

End Sub

But I wouldn't recommend a macro if there are non-macro solutions.

Hope this helps!

Not applicable
Author

I wasn't following from your description...but you example is PERFECT!!!!

Thanks so much!