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

Set Analysis, select value linked to the latest date

Hi,

I have a table 

PavelKas_0-1668603762961.png

The Property depends on Date1 only, while Date1 is less or equal to Date.

I want to filter on Date and to get a Property value linked to the latest Date1 related to the selcted Date.

I.e.

Date            Property

01.01.2002    A

02.01.2002    B

03.01.2022    C

I think it is not so difficult if I select only one Date and {<Date1=Date>} may help. But it doesn't work if I select two or three Dates.

How can I solve this issue using Set Analysis if possible?

Thanks

Labels (3)
1 Solution

Accepted Solutions
PavelKas
Contributor III
Contributor III
Author

Thank you Hic! You have goven me a direction!

View solution in original post

4 Replies
CELAMBARASAN
Partner - Champion
Partner - Champion

Hi

Have you tried P()? Example as below

{<Date1=P(Date)>}

 

Regards

Celambarasan

PavelKas
Contributor III
Contributor III
Author

Thank you Celambarasan! But I am afraid it doesnt work either

PavelKas_0-1668606132131.png

 

If I correctly understood your idea...

hic
Former Employee
Former Employee

It is not possible to use Set Analysis for conditions that require a row-level evaluation. And that is needed here.

But you can probably achieve ith through
Dimension=Date
Measure=Only(Aggr(FirstSortedValue(Property,-Date1),Date))

HIC

PavelKas
Contributor III
Contributor III
Author

Thank you Hic! You have goven me a direction!