Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
uacg0009
Partner - Specialist
Partner - Specialist

How to calculate the intersection between two date columns

Hi all,

I want to calculate the intersection between two date columns,the data like below:

Intersection.png

the two date columns are a group by ID_1 and ID_2, what I want is:

Firstly, the different group do not be considered.

And then if in some group, there is intersection between two rows like row 1 and row 2 or row 4 and row 5,

then output String "Warning" in all rows of this group in WARNING column.

the result what I want is:

Intersection2.png

the in row 3 and WARNING column is "Warning" because row 4 and row 5, not row 1 and row 2.

Finally, is there any possible to make it in expression? or only in script? whatever, I want to know how to make it.

I hope I have clarified what I want, thank you all!

1 Solution

Accepted Solutions
Nicole-Smith

Have a look at the load script in the attached.  I think it should give you what you need.

View solution in original post

5 Replies
vikasmahajan

I think you should apply interval match fucntion pls refer following link.

http://community.qlik.com/docs/DOC-3557

Vikas

Hope this resolve your issue.
If the issue is solved please mark the answer with Accept as Solution & like it.
If you want to go quickly, go alone. If you want to go far, go together.
Anonymous
Not applicable

Hi Changjun,

       can you please explain row 3,4 and 5 are coming warning,i didn't get you can you please explain.

Thanks SHAIK

uacg0009
Partner - Specialist
Partner - Specialist
Author

Because if there is a intersection in a group, all rows of the WARNING column of this group will change to "Warning".

Between

2013-04-01 to 2013-04-20  and

2013-04-10 to 2013-05-10

, there is 10 days overlapped, so it is a intersection.

Thank you basha, I hope I have clarified what you want.

uacg0009
Partner - Specialist
Partner - Specialist
Author

Thank you Mahajan.

I've already read the doc about interval match function.

And can it use in expression and even in script I also don't know how to use it in my job, because I don't have a column

like Marks to match. Do you have any ideas?

Nicole-Smith

Have a look at the load script in the attached.  I think it should give you what you need.