Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
ALERT: QlikView server communication interruptions following Microsoft Windows Domain Controller security updates
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Change alternate state with button action

Good day!

Dear colleagues, in my model i have some pivot. it has default alternate state.

Also i have one button. Is there any way to add some action function for this button, which will change alternate state for this pivot, for example, for STATE1?

Thanks.

Labels (1)
4 Replies
swuehl
Champion III
Champion III

I don't think you can directly change the state of chart via a button action, but you can create several charts in different states and use a variable to show / hide these charts. Control this variable in your button action.

jagan
Partner - Champion III
Partner - Champion III

Hi,

It is not possible to change the state of the sheet or objects dynamically, instead you can dynamically use the expression like below

=If(vStateName = 'State1', Sum({[State1]} Sales), Sum(Sales))

Hope this helps you.

Regards,

jagan.

vincent_ardiet
Specialist
Specialist

You can also avoid the IF.

Put in vStateName either $, or [State1]...

Then you expression will be:

=Sum({$(vStateName)} Sales)

Mark_Little
Luminary
Luminary

Hi,

Swuehl's approach is how i always approach this kind of thing

Mark