Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
tahreen371
Contributor III
Contributor III

How to get Balance from one Doc number with related invoices to the Document number

Hello All,

The Balance column should give a Zero if the Amount total is matching to the Payment total, else vice versa.

And also the total balance for the one Clearing Document Number  should be represented as marked in Red.

there multiple scenarios for reference in the attachment. 

Kindly help ASAP.

 

Regards

4 Replies
tahreen371
Contributor III
Contributor III
Author

the balance i output of Column Amount and Payment. if Amount and Payment columns are same then Balance should be zero else remaining amount
santhiqlik
Creator
Creator

Try this to get balance:
Sum(Total <Clearing Document Number >Amount)-
Sum(Total <Clearing Document Number > Payment)

I have done this using pivot table with some sample data. 

Invoice.PNG

 

Check the attached qvw. 

 

tahreen371
Contributor III
Contributor III
Author

Gives error in expression

santhiqlik
Creator
Creator

What's the error... I have missed [] in column name.
Sum(Total <[Clearing Document Number] >Amount) -
Sum(Total <[Clearing Document Number]> Payment)