Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Save $600 on Qlik Connect registration! Sign up by Dec. 6 to get an extra $100 off with code CYBERSAVE: REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to create new lines with given information in a fiel

I have a data base with information about a Hotel reservations in the next format:

 

 

HotelRoom TypeCheck InCheck out
XY01/01/201705/01/2017

And I need to transform each date in a line like this:

 

HotelRoom Type     Check In   Check out
XY01/01/201705/01/2017
XY02/01/201705/01/2017
XY03/01/201705/01/2017
XY04/01/201705/01/2017
XY05/01/201705/01/2017

Thank you !

1 Solution

Accepted Solutions
tresesco
MVP
MVP

Try like:

Load

  Hotel, [Room Type], [Check out],

  Date([Check In]+IterNo()-1) as [Check In]

While [Check In]+IterNo()-1<=[Check out] ;

Load * Inline [

Hotel, Room Type, Check In, Check out

X, Y, 01/01/2017, 05/01/2017]

Capture.PNG

View solution in original post

2 Replies
tresesco
MVP
MVP

Try like:

Load

  Hotel, [Room Type], [Check out],

  Date([Check In]+IterNo()-1) as [Check In]

While [Check In]+IterNo()-1<=[Check out] ;

Load * Inline [

Hotel, Room Type, Check In, Check out

X, Y, 01/01/2017, 05/01/2017]

Capture.PNG

Not applicable
Author

Great!!

Works perfectly.

Thank you.