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: 
Not applicable

How to get Last Payment for each Account? (and later to be used in Aging)

Hi guys!

I have this problem and trying to solve for several days now. I need to get the last payment made by an Account and check if its a Full payment or Partial payment and then used it in Aging Process. Please see the attached .qvw file.I have two tables: header and trans and I include two Accounts, one with last payment (full) and one with last payment which is partial. I want to get the last payment from "trans" table and then join it to "header" table since that table handles my aging computation.

I already have this Aging script (Aging:), but it doesn't consider partial payments. And I also have this aging script in (Aging2 tab) which is capable of considering Partial payment, but I need to get the last payment first. Or you can suggest what's the best way or other work around for this.

Hope that you can help me with my problem.. Thanks in advance!

Regards,
Lester

1 Reply
pover
Luminary Alumni
Luminary Alumni

Lester,

Aging is always a tough model to make. If the last payment is the only payment that could be partial, I suppose you could join the 2 tables with the columns AccountNo and Max_PayDue, but I usually look for a table that tells me which documents correspond to which full or partial payments. Sometimes this information is directly in the document table or the payment table, but ideally you would want to link the 2 tables with some sort of document or payment ID. However, this all depends on your datasource.

Regards.