Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
tahreen371
Contributor III
Contributor III

How to get the balance from two columns

Hello All,

I have two columns: AMT and PAYMENT and now i need to get a BALANCE Column out of it.

I have 4 invoices for two different Document number and now as you see in the attachment if the total Amount of the 3 invoices is same as Payment done then Balance is Zero

And if payment is not matching with Amount coulumn then Balance should show the amount as in payment.

 

Please find the attachment 

 

regards and thanks 

1 Solution

Accepted Solutions
jyothish8807
Master II
Master II

May be this then,

fabs(Sum(AMT))-fabs(SUM(Payments))

Best Regards,
KC

View solution in original post

4 Replies
jyothish8807
Master II
Master II

Hi Tahreen,

You can simply try:

sum(AMT)+sum(PAYMENT) in a straight chart. Rest fields as dimension.

Best Regards,
KC
tahreen371
Contributor III
Contributor III
Author

Hi KC,

but there are few values which are negative in Amount column as well so two negatives will give an huge sum in balance which will be incorrect.

jyothish8807
Master II
Master II

May be this then,

fabs(Sum(AMT))-fabs(SUM(Payments))

Best Regards,
KC
tahreen371
Contributor III
Contributor III
Author

Thanks that worked

Smiley Happy