Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Finding Key Dates and Associated Values in Load Script (Back End)

Hello world!

I am looking for a load solution (not front in calculation) if possible for finding the date of the highest value in a table.

I have a Donor table that has Fields like: Donor ID, Name, Initial Gift Date, Last Gift Date, Max Gift Date

and I have a Gift table with Field: Gift ID, Donor ID, Gift Amount, Gift Date, Gift Type

What I need to answer are these questions

For each Donor:

1) When was their first gift and for how much was the gift for?

2) When was their most recent gift and for how much?

3) What is the largest gift this donor has given and what is the date on that gift?


I think these will need to end up joined to the Donor table, though the information comes from the gift table.

I have seen a post by stalwar1‌ on a similar topic for a front end solution here: https://qliktech.hosted.jivesoftware.com/docs/DOC-9044

but I would like a backend solution where this is done in the load script to manage the data more easily.

Thanks in advance!

14 Replies
Anonymous
Not applicable
Author

Making the change and reloading.

What is the purpose of doing this division by 10000000000?

sunny_talwar

Giving lower weight in the sorting... here I want to sort first by GiftAmount and then by GiftDate...

Anonymous
Not applicable
Author

OK, I think I understand.

Is this in case the Gift are all the same amount, so there is not a unique "Max" gift?

sunny_talwar

Absolutely!! Since there are multiple gifts which are max, in order to pull the max date, I need to add that to the sorting. So, Max Gift on Max Date

Anonymous
Not applicable
Author

Everything is loaded in and it's working perfectly.

Thanks stalwar1!