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: 
peterstalberg
Contributor III
Contributor III

How to find a value near a dynamic date?

Hi,

In an app I have a set of three dimensions (PRODUCT_ID,  PRICE,  DATETIME). What would be the correct chart expression for PRICE_AT_180 to show the the listed price closest before 180 days after the first listing?  

I have tried several variations of =FirstSortedValue(EST_100, EST_DATETIME_FR+180) but nothing gives the desired result. Assistance on this would be highly appreciated. Thanks//Peter

INPUT

PRODUCT_IDPRICEDATETIME
Product A15 0002011-09-07 05:36:11.36113611
Product A25 0002011-10-30 06:43:31.43314331
Product A75 0002012-01-28 10:52:03.523523
Product A165 0002014-10-14 09:30:06.306306
Product A130 8582015-06-23 03:45:14.45144514
Product B5 0002018-01-19 09:59:07.597597
Product B10 0002018-03-22 16:27:13.27132713
Product B15 0002018-05-07 16:22:33.22332233
Product B22 0002019-01-07 16:22:37.22372237


RESULT

PRODUCT_IDPRICE_AT_180DATETIME
Product A75 0002012-01-28 10:52:03.523523
Product B15 0002018-05-07 16:22:33.22332233
Labels (4)
0 Replies