cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with null value in IDT.

former_member223477
Participant
0 Kudos

Hi,

I am calculating the Sales Quantity like (Debit Qty- Credit Qty)

SUM(CASE WHEN 0DEB_CRED ='D'THEN  0QUANT_B  END)-SUM(CASE WHEN 0DEB_CRED ='C'THEN  0QUANT_B END)

in Information Design Tool

In this when Credit value is null its taking Debit value also as null.

Ex: Debit is 10 and Credit is null its taking as 10-null= null.

Could you please suggest me how to resolve this.

Accepted Solutions (0)

Answers (1)

Answers (1)

Adam_Stone
Active Contributor
0 Kudos

I haven't looked into the formulas too much, but could you not do an if statement where you check if the value is null, and if it is, replace it with 0 instead?

former_member223477
Participant
0 Kudos

Its Resolved,

I used Ifnull(SUM(CASE WHEN 0DEB_CRED ='C'THEN 0QUANT_B END),to_decimal(0))