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

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

alternate state issue

Hello everyone,

i am facing problem with alternate state.

My requirement is to show 3 years of data in line chart with separate year filter.

So i have create one variable for year like

var_YEAR=IF(ISNULL(GetFieldSelection(YEAR,'','')),MAX(YEAR),(GetFieldSelection(YEAR,'',''))-2 (It show 3 years of data at a time)

Set Expression SUM({<KPI={'Production'},YEAR={">=$(=var_YEAR)<=$(=var_maxYear)"})

till this it showing 3 years data in chart, but when i used alternate state 'chart1 ' in set  expression then its showing all years of data at a time.

i tried below variable but still same issue

var_YEAR=IF(ISNULL(GetFieldSelection(YEAR,'','','Chart1')),MAX(YEAR),(GetFieldSelection(YEAR,'','','Chart1'))-2 (It show 3 years of data at a time)

Please help me to find out.

Thanks

2 Replies
jwjackso
Specialist III
Specialist III

GetFieldSelections does not work with alternate states.  See an example of using the concat function in the URL below:

https://www.resultdata.com/using-multiple-alternate-states-combined-with-set-analysis-to-create-a-co...

Anonymous
Not applicable
Author

But Below variable is working

var_YEAR=IF(ISNULL(GetFieldSelection(YEAR,'','','Chart1')),MAX(YEAR),(GetFieldSelection(YEAR,'','','Chart1'))-2