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: 
Not applicable

Embed Set Analysis into Set Analysis

Hi guys,

Need some help with the following:

The document attached has the data below:

ExternalDate InternalDate Section
20/12/2013
21/12/201321/12/2013Section 21
22/12/2013
23/12/2013
24/12/201324/12/2013Section 24
25/12/201325/12/2013Section 25

User selects one date into ExternalDate field, for example 23/12/2013

I should get the corresponding value in Section for last possible value in InternalDate when InternalDate field should have as possible values all available values UP TO 23/12/2013.

Any help will be appreciated.

Thanks,

Aldo.

1 Solution

Accepted Solutions
jerem1234
Specialist II
Specialist II

Hello Aldo,

Please find attached. I ended up going with firstsortedvalue and using the p() function in set analysis. The formula I used was:

firstsortedvalue( {<ExternalDate=, InternalDate=p({1<InternalDate={"<=$(=Date(Max(ExternalDate)))"}>} InternalDate)>} Section, -InternalDate)

Let me know if this is what you are looking for.

Hope this helps!

View solution in original post

2 Replies
jerem1234
Specialist II
Specialist II

Hello Aldo,

Please find attached. I ended up going with firstsortedvalue and using the p() function in set analysis. The formula I used was:

firstsortedvalue( {<ExternalDate=, InternalDate=p({1<InternalDate={"<=$(=Date(Max(ExternalDate)))"}>} InternalDate)>} Section, -InternalDate)

Let me know if this is what you are looking for.

Hope this helps!

Not applicable
Author

Exactly, Thanks!