RE: Debit – Credit SQL Formula
I am trying to write what I thought would be a pretty simple formula for a transaction search
{debitamount}-{creditamount}
It is just coming up blank.
I am trying to get both invoices and journals onto a single search and do a summary total, which I cannot do using the transaction total since that doesn’t exist for a journal.
Anyone know a trick to get this to work?
I’d also like to get this to work in an Analytics dataset as well.
Formula currency = CASE WHEN {debitfxamount} is NULL THEN 0 ELSE {debitfxamount} END)-(CASE WHEN {creditfxamount} is NULL THEN 0 ELSE {creditfxamount} END)
Or you can use
Formula currency = nvl({debitfxamount},0) – nvl({creditfxamount},0)