Search code examples
oracleexpressionbusiness-intelligenceobieefusion

Error in Oracle BI expression


I am trying to check if the field is 0 or null and if so, the remaining amount will be equal the invoice amount.

This error appears and I searched for it but I found nothing!

enter image description here

Here is the code:

IF (G_Invoice.Amount_Paid = 0 OR G_Invoice.Amount_Paid is null )

then

Remaining_Amount := G_Invoice.Invoice_Amount

else

G_Invoice.Invoice_Amount-G_Invoice.Amount_Paid

end if;

Solution

  • If the measure is being calculated in Oracle BI, the LSQL code should be:

    Remaining_Amount - ifnull(G_Invoice.Amount_Paid,0)