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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
gdham123
Contributor III
Contributor III

Set modifier to ignore current selection

Hi guys,

I am trying to write a set analysis for a combo chart which causes my chart to ignore any date selection on the dashboard. I have tried this:

=Sum({<[FuEm_SentDate]={"1(=Year([FuEm_SentDate])='2018')"}>}FuEm_Clicks)

But when I select 2017 the chart's bars and line disappears. Am I putting the 1 in the wrong place, or doing something else wrong?

Thanks in advance,

Gary

Labels (1)
1 Solution

Accepted Solutions
gdham123
Contributor III
Contributor III
Author

Hi Sunny-talwar, thanks for your solutions. Your second solution was almost correct.

=Sum({<[FuEm_SentYear] = {'2018'}, [FuEm_SentDate]>} FuEm_Clicks)

I just needed to place  a 1 as the set modifier so as to ignore any dashboard selection, as below.

=Sum({1<[FuEm_SentYear] = {'2018'}, [FuEm_SentDate]>} FuEm_Clicks)

 Now it works as expected.

Cheers

Gary

View solution in original post

5 Replies
jonathandienst
Partner - Champion III
Partner - Champion III

To simply ignore selection in a field:
Sum({<[FuEm_SentDate]>} ...)
Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
sunny_talwar

Try this

=Sum({<[FuEm_SentDate] = {"=Year(Only({1} [FuEm_SentDate])) = '2018'"}>} FuEm_Clicks)

But why don't you create a year field in the script like this

Year(FuEm_SentDate) as FuEm_SentYear

and then use this

=Sum({<[FuEm_SentYear] = {'2018'}, [FuEm_SentDate]>} FuEm_Clicks)
gdham123
Contributor III
Contributor III
Author

Thanks jontydkpi, 

gdham123
Contributor III
Contributor III
Author

Thanks Sunny_talwar, your second solution makes sense. The first did'nt work. I am currently reloading the large dataset and will try your solution. But surely a 1 is needed somewhere as a set modifier, otherwise the chart line will disappear when I select 2017 in the dashboard.

Thanks

Gary

gdham123
Contributor III
Contributor III
Author

Hi Sunny-talwar, thanks for your solutions. Your second solution was almost correct.

=Sum({<[FuEm_SentYear] = {'2018'}, [FuEm_SentDate]>} FuEm_Clicks)

I just needed to place  a 1 as the set modifier so as to ignore any dashboard selection, as below.

=Sum({1<[FuEm_SentYear] = {'2018'}, [FuEm_SentDate]>} FuEm_Clicks)

 Now it works as expected.

Cheers

Gary