Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
My script has this syntax:
CALCULATED_LINE_COSTS:
load [ID],
COST_GAS, COST_DEPR, COST_MAIN, COST_HWY, COST_ADMIN, COST_SALARY,
(COST_GAS + COST_DEPR + COST_MAIN + COST_HWY + COST_ADMIN + COST_SALARY) As [TOTAL_COST]
resident table_10_3;
===========================
In qlikview pivot chart, i have an expression- SUM(TOTAL_COST)
The result of it is wrong!
If I create expression summing all costs like this- SUM(COST_GAS) + SUM(COST_DEPR) + ..... and so on.
The result is correct.
Why is the script adding won't work.
Help!!
Hi,
Your fields may contain null values.
Try using Alt(COST_GAS, 0) + Alt(COST_DEPR, 0) + etc... as TOTAL_COST.
Hi,
Your fields may contain null values.
Try using Alt(COST_GAS, 0) + Alt(COST_DEPR, 0) + etc... as TOTAL_COST.
Yes, using arithmetic operator + with NULL operands will result in NULL. Use rangesum(FIELD1,FIELD2,...) instead if you want to handle NULL as zero.
I'm Grateful..