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: 
QlikBeginner1
Creator
Creator

Bringing latest value

Hi,

I am pulling in one of the apps I am developing a list of customer details from a SQL table. There are multiple lines in the table for each year. I want to bring through the latest policy for each customer. This would be the Latest 'EffectiveDate'

example.png

 

SMECustomerDetails:
LOAD
CustomerName,
PolicyNumber,
IF(len(PolicyNumber)=11,left(PolicyNumber, 2),'') AS Product,
PolicyAdminSystem,
PolicyStatus,
BusinessSegment,
date(EffectiveDate, 'DD/MM/YYYY') as EffectiveDate,
date(ExpiryDate, 'DD/MM/YYYY') as ExpiryDate,
If(CancellationDate = '01/01/0001', '', date(CancellationDate, 'DD/MM/YYYY')) as CancellationDate,
PolicyTerm
FROM [lib://QVD/DMA\SMECustomerDetails.qvd]
(qvd)
Where date(EffectiveDate,'DD/MM/YYYY') <= date(today(),'DD/MM/YYYY');


Left Join (SMECustomerDetails)
LOAD DISTINCT
PolicyNumber,
ProductCode
FROM [lib://QVD/DMA\DimPolicy.qvd]
(qvd)
Where wildmatch(ProductCode,'*');

 

This is what I currently have. Any help would be greatly appreciated!

Labels (2)
10 Replies
jonathandienst
Partner - Champion III
Partner - Champion III

I am not sure what you mean.

Please mark this question as answered and start a new post with the new question. You can add a hyperlink to this question if you want to refer back to it.

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein