Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello Folks,
While debugging another problem, I ran into something that I was unfamiliar with. Apparently, if I have a SUM measure, with a condition set to a value that doesn't exist, Qlik will ignore it and sum over the entire field. For instance.
PayTable:
LOAD *,
Null() AS 'payType'
;
LOAD * Inline
[
'employeeId', 'amount'
1, 200
1, 100
1, 36
]
;
Now as we see, the 'payType' field is null. But when I have this set analysis in the UI, I am left astonished.
SUM({<payType={'Foo'}>} amount)
Does anyone know why it's summing over everything? when Null() != 'Foo' ?
Any help is greatly appreciated.
Hi,
Add NullAsValue before your script and it's working fine.
Your field payType must not be surround by ' but " or nothing
NullAsvalue *;
PayTable:
LOAD *,
null() AS payType
;
LOAD * Inline
[
'employeeId', 'amount'
1, 200
1, 100
1, 36
]
;