Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
vindhya_giri
Creator II
Creator II

Help with Alternate States

Hi

I have an application in which I am using alternate states. I have a tab with straight table and 2 filters tab, 1 for State A and the other for State B selection. The issue is that, when I am trying to make selections in the straight table, they are not reflecting on the filters tab list boxes. Also, the Current selection box shows that the field is selected in the straight table but it is not getting reflected in the straight table too. Basically, when I am making selections in the straight table it is not working. But when I am making the same selections in both the filters tab, they are reflecting on the straight table.

Any suggestions please

Thanks

1 Solution

Accepted Solutions
swuehl
MVP
MVP

This happens when your chart is set to default state and you are using set analysis in the chart expression to get your alternate states into the game.

What would you expect to happen instead?

Maybe it's best to set the chart to read-only on general tab to not mess up with default state.

View solution in original post

19 Replies
swuehl
MVP
MVP

This happens when your chart is set to default state and you are using set analysis in the chart expression to get your alternate states into the game.

What would you expect to happen instead?

Maybe it's best to set the chart to read-only on general tab to not mess up with default state.

Not applicable

the issue is state a and state b currently apply to the 2 filters.  The straight table is not assigned to any state (A or B) and neither is the current selection box.  Both the current selection box and straight table are using the default state so that is why the current selection only reflects selections within the striaght table

Usually with alternate states, you have 2 sits of filters, which you have, but also 2 sets of charts so you can filter each set of charts based on different criteria

beck_bakytbek
Master
Master

Hi Vindhya,

try to use the Set-Expression instead of Alternate State.

kindly

Beck

Not applicable

Another question would be - what is the business case/what are you trying to accomplish?

If you could explain, we could determine the best way for you to address - as you can see from other responses, maybe alternate states is not the correct approach

vindhya_giri
Creator II
Creator II
Author

Hi Adam,

The business case is that we have a straight table from which the users export to excel for their analysis. This way they are doing it by selecting the year/month they want from the list box. Now, what they want is, they want to compare two year/month(example 2015/08 and 2014/08). Currently, they are selecting 2015/08 export to excel and then select 2014/08 and export to excel. then they are comparing those two excels for their analysis. So,  to overcome this, created alternate states.  list box with State A in which they select 2015/08 and list box with state B in which they select 2014/08 so they can do side by analysis for comparison  in one straight table instead of exporting it twice.

Please Advise

Thanks

vindhya_giri
Creator II
Creator II
Author

Hi swuehl.

Your idea of read only helps so that the user has no chance to make selections in the straight table but instead make selections in the filters tabs only. But, I also want to know if there is a way to overcome when user make selections in the straight table, it should reflect on both the filters tab?

Please advise

Thanks

Not applicable

if you want to do side by side comparisson, which is ideal for alternate states, you really need to objects, in this case 2 straight tables, one with state a and other other with state b - make your selections with each filter and then you will have the results in one table based on dates in filter state a and the other based on filter state B

vindhya_giri
Creator II
Creator II
Author

when I am trying to do with two tables, the tables are coming up properly with inherited state but when I make selections in the tables, they are not getting selected even though it shows as selected(green dot beside the field heading). When I am trying to change the states , one with state A and the other straight table with state B, the table itself is getting hidden

Please advise

Thanks

swuehl
MVP
MVP

If you make selections in charts, you effectively select dimension values. Since the chart is in default state, your dimension values will be selected in default state.

If you want a selection in default state to be copied to the alternate states, you can use triggers (like field event triggers) with appropriate actions, but it could makes things quite nasty.

You can also have your set expression in the chart consider the default state dimension set, so you don't even need to copy selections around.

Like

=Sum({AS1<Date = $::Date>*AS2<Date=$::Date>} Value)