Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Value setting for one field based on another field filter

I have a scenario where a filter is defined on Year. I am displaying quarters in the pivot table. If no Year is selected I need to display specific quarters of data say 2017 Q1 and 2017 Q2 but if an year is selected I need to display the quarters linked to the year selected. For example if 2016 is selected I need to display 2016 Q1, 2016 Q2, 2016 Q3 and 2016 Q4. This is a Qlik sense question.

Any thoughts?

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Something like this should work (depending on your filed names of course):

=aggr(if(GetSelectedCount(Year)=0,

only({<Year={2017}, Quarter={'Q1','Q2'}>} QuarterYear),

only(QuarterYear)),QuarterYear)

View solution in original post

3 Replies
Anonymous
Not applicable
Author

Something like this should work (depending on your filed names of course):

=aggr(if(GetSelectedCount(Year)=0,

only({<Year={2017}, Quarter={'Q1','Q2'}>} QuarterYear),

only(QuarterYear)),QuarterYear)

Anonymous
Not applicable
Author

I am trying the below and throws an error,

=aggr(if(GetSelectedCount(FY)=0, only({<FY={'2017'}>}FQ), only(FQ)),FQ)

Cant see where the issue with the syntax. Please help!

Anonymous
Not applicable
Author

Thanks Michael! Works fine now!