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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
ManuelLindekeit
Contributor III
Contributor III

Set Operators

Hi

I am looking for a clarification on how += and *= works.

Union: count({<Year += {"=Decade='1970s'"}>} FilmID). I was expecting that if I select Year 1965, I will now see all movies from 1965 and 1970-1979 (all years in the 1970s). But the behavior shows no effect of {"=Decade='1970s'"} whatsoever, if I make any selection. I know that I get the correct union of 1965 and 1970-1979 when I use the following code. count({<Year += {1970,1971,1972,1973,1974,1975,1976,1977,1978,1979}>} FilmID). 

I am trying to understand the concept here of why its not behaving as I think it should. Prepping for data architect certification. 

Thanks Manuel 

2 Replies
sunny_talwar

I think the issue is that Decade filters out 1970s as soon as you select 1965... so what you might need is this

Count({<Year += {"=Only({<Year>}Decade) = '1970s'"}>} FilmID)

This way you will have all Decade's available regardless of selection in Year field. You might also be able to do this

Count({<Year += p({<Year, Decade = {'1970s'}>})>} FilmID)

 

Saravanan_Desingh

Hi @sunny_talwar  You are really good in this.