Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
How to check and replace the null values with 0 where the expression results are returning the null values from the aggr(sum) function.
For example: I am trying to calculate if(aggr(sum(sales), customer > 0 and sum(sales, customer <= 0, 'LOST') now here the condition is not getting true since there may be NULL values obtained by the result of this expression. So I would like to replace the null values with zeros so that this condition is always evaluated as true when values are zero or null.
I hope you got my problem. Please advise the solution asap.
Thanks and Regards
Sajid Mahmood
You can use:
If(isnull(value), 0, value)
or
If(isnull(sum(value)), 0, sum(value))