Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello:
I need to exclude negative numbers from summing. My struggle is finding and using the right syntax.
Any and all help is appreciated. Thanks in advance.
Anytime you see a red wiggly line underneath a field name, you got to be cautious. Best thing to do is to remove the field name and then start typing its name and QlikView's script editor will start giving you the field name. Once you see your field name click enter and you should get the field name typed out for you. This way you won't have any issues related to mistyping a field name.
HTH
Best,
Sunny
Glad you got it correct!
Though it's strange you got your correct numbers with a wrong set expression filter (even though the numbers differed from the requested result in your OP)...
Instead of using a per row comparison in the chart expression, you can also create a flag in the script to filter the positive amount values.
LOAD
If( [Finance Confirmed 2016 Savings] >0, 1,0) as PositiveSavingsFlag,
...
Sum({<... ,PositiveSavingsFlag = {1} >} ...)
This should perform better on large data volume.