Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
sum({1-$<year+={2005,2006}>}[budget amount])
- how it workspls explain me
sum({1-$<year-={2005,2006}>}[budget amount])
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:
Sum({<Year-{2010}>Sales) : all years are in the scope, and 2010 is excluded. Now when you select 2013
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:
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.