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: 
Nextle
Contributor
Contributor

date interval

Hello.there is a date_start and date_end of one row and a second. If one interval is larger than the other, the result is the row with the largest interval. please help me

Nextle_0-1623918469244.png

result:

Nextle_1-1623918525501.png

thank you in advance.

1 Reply
MayilVahanan

Hi 

Try with firstsortedvalue function something like below

Temp2:
Load * Inline
[
ID, Date_Start, Date_End
66, 22.03.2021, 03.04.2021
70, 28.03.2021, 30.03.2021
];

Inner Join
Load FirstSortedValue(ID, Interval(Date_Start-Date_End)) as ID Resident Temp2;

MayilVahanan_0-1623925982277.png

 

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.