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: 
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
MVP
MVP

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.