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

Alternate States in specific chart columns and conditions

Dear friends, I´ve got a problem that hopefully you can help me with. I try to solve it using alternate states, don´t know if there´s any other way, but this felt like the correct way to do it.

I´ve attached a qvw, with a very simple P/L statement. I´ve got a chart (pivot table) with columns for different versions and years. I use SET analysis to define what year that should be presented in each column. All the different versions contain Values for only the year that they were created (field VersionCreationYear), except for the MTP that contains values for the next three years after the year it was created. Let´s say for example that I want so select Year=2017, and then I want to display the MTP (field Version) that was created in 2016. That MTP contains the years 2017 - 2019. Now, the list boxes wouldn´t behave the way I want. If I select VersionCreationYear 2016 and Year 2017 that would make me unable to select for example 'Forecast1' in the Version field (I have one column that displays the highest selected Forecast nr).

I thought I could solve this with Alternate states, but I get some problems that I´m not able to solve

  1. I still want to be able to make selections in all other fields in the database, and they should be reflected in all columns (in my real app there are a lot of other fields).
  2. I want it to be mandatory to select one value in the field VersionCreationYear, since I don´t want the MTP columns to display values from many MTP Versions on the same year. The chart should only be calculated when on VersionCreationYear is selected.

Does anyone have a solution?

Regards Johan

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Maybe I should just reload the values from VersionCreationYear into a new field in a new table that is not connected to the other tables? Then I can use SET analysis to match the values in the new field against the values in VersionCreationYear. Then the users will make selections in the new field, which will not affect the other list boxes, but the values in the charts can still be defined by the selection in the new field? Then I´ll skip the Alternate states...

View solution in original post

4 Replies
girirajsinh
Creator III
Creator III

Hi Johan

I looks like you will not need alternate state in what you are trying to achieve.

There is some Data model related questions / issue , so lets address that first.

There is no link for fields UnitText and UnitSek. How those should be linked to other table ?

Anonymous
Not applicable
Author

UnitText and UnitSEK are just there to get the vUnitSEK variable right. They shall not be linked to the other table. Just have a look at the end of each expression and then you will see how that variable is used

Anonymous
Not applicable
Author

Maybe I should just reload the values from VersionCreationYear into a new field in a new table that is not connected to the other tables? Then I can use SET analysis to match the values in the new field against the values in VersionCreationYear. Then the users will make selections in the new field, which will not affect the other list boxes, but the values in the charts can still be defined by the selection in the new field? Then I´ll skip the Alternate states...

beck_bakytbek
Master
Master

Hi Johan,

look at this:

https://www.youtube.com/watch?v=F1-qAgqyB2c

i hope that resolves your issue

beck