Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I want to sum the sales of the customers not beloning to a that segment last year.
I'm trying:
Sum( {$<[SEGMENT 2012]-=[SEGMENT 2013]>} SALES)
but this is not a correct expression.
Second question: How would the syntax looks like if I hadn't had the SEGMENT spilt up in years:
Sum( {$<YEAR={2012},[SEGMENT]-=YEAR={2013},[SEGMENT]>} SALES)
Try this
Sum( {$<YEAR={2012},[SEGMENT]-={$(=only({<YEAR={2013}>}[SEGMENT]))}>} SALES)
hope this helps
See attached example...
Thanks, I see your expression is also not accepted as correct syntax judging the red curly lines.
Should I ignore this?
Ignore that "Red" curly lines..expression will ork..
Some how qlikview hates notequal sign "-=".
Try this
Sum( {$<YEAR={2012},[SEGMENT]-={$(=only({<YEAR={2013}>}[SEGMENT]))}>} SALES)
hope this helps
LoL, your expression works but...doesn't give the right answer.
Somehow the customers with the same segment in 2012 and 2013 are also stated in the sum(sales)
Even stranger, when I want to see what the sales of the customer in the same Segment as last year are:
Sum( {$<YEAR={2012},[SEGMENT] = {$(=only({<YEAR={2013}>}[SEGMENT]))}>} SALES)
This expresion returns 0.
So '-=' includes the same segments and '=' excludes it 😉
Somebody any thoughts (hopefully without sending a sample of the document)
I think I've just answered a similar question here. Perhaps that helps you find your solution. I think you're looking for the e() function for indirect set analysis expressions.