Skip to main content
Announcements
Introducing a new Enhanced File Management feature in Qlik Cloud! GET THE DETAILS!
cancel
Showing results for 
Search instead for 
Did you mean: 
haymarketpaul
Creator III
Creator III

Load 1 address of 3 based on latest date

QV11 SR4

I need to select the latest address based on the latest date where one exists eg...

Dateformat DD/MM/YY

CMS DateCMS Address1DSB DateDSB Address1MIMS DateMIMS Address1
03/11/1510 Richmond Road04/05/15126 Muirs Lane09/02/15555 Dunbar Street

I know i can use Date(RangeMax....   to quickly find the latest date of the 3 and

In the example above the CMS Date is the latest so i would use CMS Address1 as the latest Address1 which is fine BUT if CMS Address1 is empty i would then want to take the next available Address1 (DSB in the example above) and so on with the MIMS Address1 if the DSB one is empty.

I can satisfy this logic in a lengthy IF statement but am wondering if there's a better more efficient way to handle this?

Any advice?

16 Replies
avinashelite

Hi Paul,

Did you got the answer ?

haymarketpaul
Creator III
Creator III
Author

Attempting to Implement at the moment will let you know

haymarketpaul
Creator III
Creator III
Author

Several correct answers in there - thanks for everyone for the replies

haymarketpaul
Creator III
Creator III
Author

All working nicely now - small issue if 2 dates clash as the highest

haymarketpaul
Creator III
Creator III
Author

Couldn't get this approach to work i'm afraid but nice idea - thanks

avinashelite

Aha in that case ...if you have the time associated with that ? then you could decided on the time ...

otherwise you need to write a condition statement to pick either any one of the address ....like CMS or DSB address

haymarketpaul
Creator III
Creator III
Author

Yes no time available in 2 of the 3 sources so have gone with a condition statement - thanks