Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Alternate State PIVOT tables

Hi amazing community.

I have  a question which seems to be fairly simple, but I can get it to work.

I have 1 listbox, and 1 Pivot table. This Pivot table has 1 simple dimension (not calculated) this dimension is called "employee" and contains 6 names.  Furthermore the Pivot table contains 10 calculated expressions. When I make a selection of an employee name in my listbox, the Pivot table will adjust and only show the column with the selected name.

Now I would like to duplicate my listbox and Pivot table, so I can do a comparison. I gave my listbox and alternate state (stateA) and applied the same alternate state to my Pivot table. But now when I make a selection in my listbox, the Pivot table doesn't change anymore and will still show all 6 columns with all 6 names of the dimension.

I was wondering if it is possible to use alternate state and have only the column displayed which I'm interested in based on my selection in the listbox?

Thank you very much for your help!

1 Solution

Accepted Solutions
marcus_sommer

Your approach sounds ok. Commonly will be two states (group A + group B) created for such a direct comparisation but it should also work if only one listbox/pivot is assigned to a named state and the other to the default state of the document. Therefore have a check if you have really assigned the states to the right objects and also have a look on the expressions which you used - then if you used set analysis expressions you could overwrite the state-assignment, for example an expression like: sum({$ < Field = {'Anyvalue'}>} Value) will ignore the state then it is per $-sign assigned to the document default-state.

- Marcus

View solution in original post

4 Replies
pooja_sn
Creator
Creator

ListBox selections will reflect on Pivot table if both the sheet object have the same Alternate State.

Please share your qvw if possible.

oscar_ortiz
Partner - Specialist
Partner - Specialist

It sounds like you want to create a second list box using the same alternate state as the pivot table.

marcus_sommer

Your approach sounds ok. Commonly will be two states (group A + group B) created for such a direct comparisation but it should also work if only one listbox/pivot is assigned to a named state and the other to the default state of the document. Therefore have a check if you have really assigned the states to the right objects and also have a look on the expressions which you used - then if you used set analysis expressions you could overwrite the state-assignment, for example an expression like: sum({$ < Field = {'Anyvalue'}>} Value) will ignore the state then it is per $-sign assigned to the document default-state.

- Marcus

Not applicable
Author

Thank you very much Marcus,

The $-sign was indeed the character in the expression that made the Pivot table not respond the way I was looking for. Removing the $ sign solved the problem!

Thank you all for your help, very much appreciated!!