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

Announcements
Discover how organizations are unlocking new revenue streams: Watch here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

days between a date range

Hi,

i have a table with a KEY, MINDate, MAxDate.

i need to generate another table with Key and day number which indicate the day 0 , day 1 lie that.

table1:

KEY MinDate     MaxDate

1a     1/4/2015     3/4/2015

2a     3/4/2015     4/42015

3a     7/4/2015     9/4/2015

i want something like this

result

KEY Day

1a     0

1a     1

1a     2

2a     0

2a     1

3a     0

3a     1like this

please help

1 Solution

Accepted Solutions
marcus_sommer

The logic should be like this:

result:

Load Key, iterno() - 1 as Day

Resident table1

while num(MinDate) + iterno() - 1 <= num(MaxDate);


- Marcus



View solution in original post

2 Replies
marcus_sommer

The logic should be like this:

result:

Load Key, iterno() - 1 as Day

Resident table1

while num(MinDate) + iterno() - 1 <= num(MaxDate);


- Marcus



Not applicable
Author

Thanks Marcus this solved my problem