Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
qlikview979
Specialist
Specialist

Date

Hi Experts,


I have one Excel file Sheet1 having  one column  date like JAN1 to  JAN30 and sheet having "Startdate" and "Enddate" fields.


if i give  in sheet 2 like


Startdate  Enddate

JAN5        JAN20



i want here date from JAN5 to JAN20



Expected output:-


jan5

-

-

--

-

-


jan20


Regards,

Mahesh.









1 Solution

Accepted Solutions
settu_periasamy
Master III
Master III

Try this..

T1:

LOAD StartDate,

     EndDate

FROM

[Date Range Excel.xlsx]

(ooxml, embedded labels, table is Sheet2);

let vpeek=Peek('StartDate',0,'T1');

let vpeek1=Peek('EndDate',0,'T1');

DROP table T1;

T2:

LOAD Date

FROM

[Date Range Excel.xlsx]

(ooxml, embedded labels, table is Sheet1)

Where Date>='$(vpeek)' and  Date<='$(vpeek1)';

View solution in original post

10 Replies
qlikview979
Specialist
Specialist
Author

Hi,

Can any one give solution to my requirement.

settu_periasamy
Master III
Master III

Can you share you excel and expected output?

may be like this?

T1:
LOAD * INLINE [
StartDate, EndDate
1/1/2016, 1/31/2016
2/1/2016, 2/10/2016
]
;

NoConcatenate
T2:
LOAD Date(StartDate+IterNo()-1) as Date
Resident T1 While Date(StartDate+IterNo()-1)<=EndDate;

DROP Table T1;

qlikview979
Specialist
Specialist
Author

Hi,

I am using this script but my where condition is not working.

T1:

LOAD StartDate,

     EndDate

FROM

(ooxml, embedded labels, table is Sheet2);

let vpeek=Peek('StartDate',0,'T1');

let vpeek1=Peek('EndDate',0,'T1');

DROP table T1;

T2:

LOAD Date

FROM

(ooxml, embedded labels, table is Sheet1)

Where $(vpeek)>=Date and  $(vpeek1)>=Date;

settu_periasamy
Master III
Master III

Did you check the vpeek and vpeek1 format? is that match your Date field?

Can you post the sample Excel file?

qlikview979
Specialist
Specialist
Author

Hi,

Please find my Attachment.

settu_periasamy
Master III
Master III

Try this..

T1:

LOAD StartDate,

     EndDate

FROM

[Date Range Excel.xlsx]

(ooxml, embedded labels, table is Sheet2);

let vpeek=Peek('StartDate',0,'T1');

let vpeek1=Peek('EndDate',0,'T1');

DROP table T1;

T2:

LOAD Date

FROM

[Date Range Excel.xlsx]

(ooxml, embedded labels, table is Sheet1)

Where Date>='$(vpeek)' and  Date<='$(vpeek1)';

qlikview979
Specialist
Specialist
Author

Hi,

Thanks,Its Perfectly Working.

Regards,
mahesh

settu_periasamy
Master III
Master III

Welcome.

Can you close this thread, if you got the answer?

jonathandienst
Partner - Champion III
Partner - Champion III

Please close your threads once they have been answered. You have dozens of open questions and its good practice to close those that have been correctly answered.

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein