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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Brokenhips
Partner - Contributor II
Partner - Contributor II

Loading a table on Max date within a data set

Having been away from Qlik for a number of years, just getting back to this and have a question.

I have a table -

PR_Id,  VehicleType,  PR_EffectiveFrom,  PR_EffectiveTo,  PR_BasicPR_Vat

45366Car05/10/2009 00:0001/12/2009 00:0011678.26091751.7391
45366Car01/12/2009 00:0001/01/2010 00:0012026.0871803.913
45366Car01/01/2010 00:0022/03/2010 00:0012026.08512104.5649
45366Car22/03/2010 00:00NULL12225.53192139.4681

 

I want to load only the records that contain either the MAX  PR_EffectiveTo date in the set of the SAME PR_Id's or

The record with NULL as the Max PR_Effective_To date if that is present in the same PR_Id set

 

I.e - of the 4 records above - I want to load only the NULL records for ID 45366 or if this had a MAX date - then that record.

Thanks in advance

Broken

Labels (2)
2 Replies
hacr
Creator
Creator

Brokenhips
Partner - Contributor II
Partner - Contributor II
Author

Thats great thankyou