Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

olapaulsson
New Contributor III

How do I find continuous interval

Hi, I have a table with 3,65 million rows where I have 365 dates and each date has 10 000 keys (PersonID) and some attributes. I'd like to convert this to a table with PersonID, attributes and a daterange of StartDate and EndDate like in the sample tables below. I do not now how to achive this, does anyone have an idea that could help me?

Original table:

New table:

TIA

Ola

1 Solution

Accepted Solutions

Re: How do I find continuous interval

Should be easy like this

LOAD PersonID,

     FirstName,

     LastName,

     Min(Date) as StartDate,

     Max(Date) as EndDate

FROM ...

Group By PersonID, FirstName, LastName;

View solution in original post

2 Replies

Re: How do I find continuous interval

Should be easy like this

LOAD PersonID,

     FirstName,

     LastName,

     Min(Date) as StartDate,

     Max(Date) as EndDate

FROM ...

Group By PersonID, FirstName, LastName;

View solution in original post

Highlighted
olapaulsson
New Contributor III

Re: How do I find continuous interval

Worked perfectly, thanks! I got my new tables size down to only 4,6% of the original table!

//Ola