Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi there,
I am going to set analysis for the straight table to get the total of revenue that got cancelled.
What I am used is sum(if ( order_status='Cancelled' and isnull(InvoiceItemID) Revenue_USD))
The expression itself does not have any syntax error, but the result is way off.
I am wondering if there is any way to get the null values for InvoiceItemID field so that the revenue associated with those null InvoiceItems will be summed up.
Can anyone please help me out?
Thank you so much in advance!
Best Regards,
Gloria
The field might show not NULL, but empty or blank values.
A safer way to handle NULL as well as empty or blank values is
sum(if ( order_status='Cancelled' and len(trim(InvoiceItemID))=0, Revenue_USD))