Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Compare Dates and Extract historical data

[View:http://community.qlik.com/cfs-file.ashx/__key/CommunityServer.Discussions.Components.Files/11/8551.DateExtract.zip:550:0]

Hi,

Just wondering if anybody had a similar issue to below.

I read in certain information for given dates. User must select the Period End date and if there is no data for that given date, should extract the most recent historical data.

Thus in the attached, user entered Period End date (BSD) of 01/02/2009. There is no data for that date but data for 2 currencies on 31/01/2009 and for the 3rd currency on 28/01/2009. However using Min / Max only returns data for 31/01/2009 when I need to see information for all currencies.

Are there alternative functions I should be using?

date

(if(DATE < BSD, rangemin(BSD, DATE),BSD),'DD/MM/YYYY')





1 Reply
Not applicable
Author

Add this expression to the "Latest Market Rates" chart:

firstsortedvalue({$<DATE={">=$(PLD)<=$(BSD)"}>} EX_RATE,-DATE)