Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Date Conversion

I Have A Table Like This :

CHECKINDATE          CHECKOUTDATE     DAYS     NAME

01-04-2012                         05-04-2012               4                    AAA

02-04-2012                         03-04-2012               1            BBB

04-04-2012                 07-04-2013               3            CCC

Can I Convert It In QlikView Like This:

DATE           DAYS           NAME

01-04-2012               1                         AAA

02-04-2012               1                         AAA

03-04-2012               1                         AAA

04-04-2012               1                         AAA

02-04-2012               1                         BBB

03-04-2012               1                         BBB

04-04-2012               1                         CCC

05-04-2012               1                         CCC

06-04-2012               1                         CCC

1 Solution

Accepted Solutions
Gysbert_Wassenaar

See attached qvw. Note, the inline load is just an example. Substitute it with something that loads your actual data. But why you do have two days for group BBB when the difference between checkindate and checkoutdate is only one day? If it's not a mistake you'll have to explain the logic.


talk is cheap, supply exceeds demand

View solution in original post

2 Replies
Gysbert_Wassenaar

See attached qvw. Note, the inline load is just an example. Substitute it with something that loads your actual data. But why you do have two days for group BBB when the difference between checkindate and checkoutdate is only one day? If it's not a mistake you'll have to explain the logic.


talk is cheap, supply exceeds demand
Not applicable
Author

You could use peek function while loading. IF PEEK(Name)=Name then Date=(Checkindate+1) else checkindate.The date syntax is not exact, you have to use combination of floor and date.