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

Separate Month Filters for different Year

Hi All,

I have data as shown below for all months in last year and this year:

YearMonthSales
2012Jan1
2012Feb2
2013Jan3
2013Feb4

I want a filter on my page, that should give me a flexibility to choose a combination of any months, something like the attached picture.

For example: I should be able to select October 2012, Jan 2013 and Mar 2013 for comparison.

Currently, if I add Year and Month selection box in my sheet, either I select same Month for both years (Jan 2012 and Jan 2013) or a range of continous months for a single year (Jan,Feb,Mar 2013)..

Is this even doable?

1 Solution

Accepted Solutions
Not applicable
Author

Thank you Mohit and Tresesco for introducing me to Alternate States. I was able to do this by using the below expression:

Function({[state_identifier1] <field_name2= [state_identifier2]::field_name3>}field_name)

as specified here:

Re: Is possible to use alternate States with set analysis

Alternate States Set Analysis

View solution in original post

6 Replies
tresesco
MVP
MVP

May be like attached sample ?

Not applicable
Author

Tresesco, I had tried that earlier. If you notice, you cannot select one month from 2012 and one month from 2013 in your example. You can either select months in 2012 OR months in 2013 in your file. Pls see if you have a workaround.

Thanks,

Sagar

tresesco
MVP
MVP

In that case, use alternate state. PFA.

Not applicable
Author

Thanks Mohit and Tresesco for informing me about Alternate States. But it still doesnt solve my problem. I was able to create two month filters with State 1 and State 2, but in my chart expressions, I want a union of both State 1 and State 2. For example, if State 1 Month (2012) is selected as October and State 2 Month(2013) is selected as January, I want to see Sum(Sales) for both October and January. Currently, using Set analysis,  I can do a sum for either of the states and not both. I hope I am able to explain the issue better. Let me know your thoughts.

Best,
Sagar

Not applicable
Author

Thank you Mohit and Tresesco for introducing me to Alternate States. I was able to do this by using the below expression:

Function({[state_identifier1] <field_name2= [state_identifier2]::field_name3>}field_name)

as specified here:

Re: Is possible to use alternate States with set analysis

Alternate States Set Analysis