I think the problem you have is that you have called the NetSalesValue twice... try the formula below..
if(If(Len(NetSalesValue) > 9, 0, NetSalesValue)< 0, NetSalesValue, 0) as [Credit Value],
Or you could use this.
If(Len(netSalesValue)>9 and NetSalesValue<0, NetSalesValue,0) as [Credit Value],
I Hope this helps