Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

set explination?

sum({1-$<year+={2005,2006}>}[budget amount])

- how it workspls explain me

sum({1-$<year-={2005,2006}>}[budget amount])   

1 Reply
tresesco
MVP
MVP

Let me try to explain:

I guess, the major confusion could be with '{<year-={2010}>}' Vs '1-${<year-={2010}>}'

'{<year-={2001}>}' : tells to excluded year 2010 if that is in the scope, whereas,

'1-${<year-={2001}>}' : tells to take all except all in the scope except year 2010.

                                            Note: 'except (..., except year 2010)' acutally makes year 2010 included.

The screen shots below could help better understand:

Screen Shot 12-12-14 at 11.38 AM.PNG

Sum({<Year-{2010}>Sales) : all years are in the scope, and 2010 is excluded. Now when you select 2013

Screen Shot 12-12-14 at 11.39 AM.PNG

In the scope is only 2013. Now:

Sum({<Year-{2010}>Sales)  : has to exclude 2010 from scope and that is not there, so it has to show only 2013.

Sum({1-$<Year-{2010}>Sales) : has to take out all in the scope(2013 here) except 2010 (but that is not in the scope, so that would not come in the scope to exclude from exlusion(ultimately inclusion) anyway).

Had 2010 been in the scope like:

Screen Shot 12-12-14 at 11.57 AM.PNG

          Now, in the scope are 2010 and 2010 and those have to be excluded (except 2010).

Hope I have been able to clear upto some extend. Any doubt, let me know.