Qlik Community

App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Announcements
Customer & Partners, DEC. 9, 11 AM ET: Qlik Product & Strategy Roadmap Session: Data Analytics REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Qlik_Enthu
Creator II
Creator II

Alternate States: Two states on different sheets

Hello All,

Is it possible to use two states on different pages? I am trying to achieve this but not successful. I created a state and applied on a page. it works. however, for another page i create a state and applied on the filter. not impacting. if i remove the second state and make a selection normally on the filter pane object, it shows in the selection panel as default state selected. 

I wanted to have two states to be displayed as its` filter pane names. For instance:

I have a filter pane objects named as No of Days_1 and No of Days_2. For sheet 1, I applied "No of Days1_State" and for Sheet 2 "No of Days2_ State"

No of Days1 State is working as expected but not No of Days2_State. 

Do I need to create any Dimensions/Measures and apply it on the Filter pane? 

Can someone help me clarifying?

P.S. Values for No of Days_1 and No of Days_1 filter pane comes from code as a result of if conditions. (List of string values)

7 Replies
Stevie_Go
Contributor III
Contributor III

Hi QLik_Enthu,

"Do I need to create any Dimensions/Measures and apply it on the Filter pane?" -> A state is representing all dimension values you filter in your App, it somehow makes different "rooms". the state only tells which "room" your diagrams are in, and all dimension flters in this room are applied to all diagrams in this rooms, but different rooms can have different set of dimension filters and diagrams to react to. All filters you set in the filter pane assigned to state1 will only affect diagrams assigned to state1. the same is for state2. so you would need at least 2 similar diagrams, each for one state (and maybe a third one for the standard state).

As an example, lets say you have 1 Dimension "Sales Region" and one KPI "Sales"

You make two states,two filter panes and two charts. you can now select Sales Region US in state1 and sales region Europe in state2. So chart one (which is assigned to state1) now shows only the values of sales in the US, the other one only sales in europe. so it let´s you compare different regions on one sheet.

A sheet itself does not assign to a state, only the diagram can be assigned to the state you want.

If you want to mix states in a  diagramm you need SetAnalysis.

Hope that helps

BR Stevie_Go

Qlik_Enthu
Creator II
Creator II
Author

Hi, I thanks for the explanation. 

so does it means, the alternate state will work on different objects on the same page. but cant` be applied to different pages? 

pls clarify!

 

salonicdk28
Contributor III
Contributor III

You can apply a alternate state to a visualization, or a sheet. If you apply a state to a sheet, all visualizations on the sheet inherit the state unless you apply another state to a specific visualization.

Qlik_Enthu
Creator II
Creator II
Author

That`s what I did now! created a state for a sheet and applied on the filter pane object, table object. Rest of the sheets in the application are in default state with a single field selection filter. 

Rest of the pages works fine! but the state i created and applied not giving me the accurate output. 

Not used any set analysis. 

I am stuck what is the thing i did wrong here..

salonicdk28
Contributor III
Contributor III

You need to add states like group1 in your expression like sum({group1}Sales) useful for comparing the measure values for different dimension selections side by side and after adding in your expressions, add in the sheet properties as well to sync 

Qlik_Enthu
Creator II
Creator II
Author

Here i have no of days like(1 day, 2 days, 1 week and so on)  string values  added in the filter pane object. by default i have to choose one of the value and the data set should reflect the count of rows accordingly.

Hence, i cannot use any aggregation functions here..

Stevie_Go
Contributor III
Contributor III

can you post some screenshots to actually depict your problem? what field / dimension do you want to count the values in?

If you have a filter pane and a bar chart assigned to your state you should be able to use aggregate functions like in the standard state. Keep in  mind that as long as you don´t filter the values of a certain dimension, all values of that dim will be used in every state!