Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Anyone know how to add the credits and debits from the same field to end up with two different totals? The example is attached in excel format.
Hi,
you can simply add an IF statement inside your Sum expression.
Credit:
sum(if([Actual Cost]<0,[Actual Cost],0))
Debit:
sum(if([Actual Cost]>0,[Actual Cost],0))
See attached example,
Ingo.
Hi,
For financial calculation it is better to create Credit and Debit fields in Script:
You can use:
Load
ExpenseLine,
If(Amount>=,0,Amount,0) as Debit,
If(Amount<0,Amount,0) as Credit
From Table;
Now you can use
Sum(Debit) and Sum(Credit) in chart
hope this will help.
Regards
Vijay
Hi,
You can arrive a flag for Credit and Debit in script as suggested by Vijay
TableName:
Load
ExpenseLine,
If(Amount>=,0,Amount,0) as Debit,
If(Amount<0,Amount,0) as Credit
From Table;
Now you can use
Sum(Debit) and Sum(Credit) in chart
If you don't want to arrive a flag in script then use the following expressions
Credit:
=Sum({<[Actual Cost]={'<0'}>}
[Actual Cost])
Debit:
=Sum({<[Actual Cost]={'<0'}>}
[Actual Cost])
The best way to do this is arriving the flag for Debit and Credit in Script.
Hope this helps you.
Regards,
Jagan.
Hi,
Try with this
TableName:
Load
ExpenseLine,
If(Amount>=,0,Amount) as Debit,
If(Amount<0,Amount) as Credit
From Datasource;
Now you can use
Sum(Debit) and Sum(Credit) in chart
This is the best one.
Celambarasan
Thank you all for your suggestions, I was able to create what I need with your input! Venus