Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
QLIKWORLD LIVE! MAY 16 - 19TH, EARLY BIRD DISCOUNTS! REGISTER TODAY
cancel
Showing results for 
Search instead for 
Did you mean: 
d_koti24
Creator II
Creator II

Issue in Slowly Changed Field Split Date field into From and to Dates

HI all,

 

I need to split date field as two different fields(FromDate,ToDates).

please find the attached file for Example.

 

Thanks in Advance.

Koti.

 

 

1 Solution

Accepted Solutions
sunny_talwar

Try this

VACATION:
LOAD Code, 
     CodeID, 
     FieldDate, 
     Empname,
     Ceil(AutoNumber(RecNo(), Code&CodeID&Empname)/2) as TempField1,
     Mod(AutoNumber(RecNo(), Code&CodeID&Empname), 2) as TempField2
FROM [Temp.xlsx]
(ooxml, embedded labels, table is Sheet2);

FinalTable:
LOAD Code,
	 CodeID,
	 FieldDate as From,
	 Empname,
	 TempField1
Resident VACATION
Where TempField2 = 1;

Left Join (FinalTable)
LOAD Code,
	 CodeID,
	 FieldDate as To,
	 Empname,
	 TempField1
Resident VACATION
Where TempField2 = 0;

DROP Table VACATION;

View solution in original post

2 Replies
sunny_talwar

Try this

VACATION:
LOAD Code, 
     CodeID, 
     FieldDate, 
     Empname,
     Ceil(AutoNumber(RecNo(), Code&CodeID&Empname)/2) as TempField1,
     Mod(AutoNumber(RecNo(), Code&CodeID&Empname), 2) as TempField2
FROM [Temp.xlsx]
(ooxml, embedded labels, table is Sheet2);

FinalTable:
LOAD Code,
	 CodeID,
	 FieldDate as From,
	 Empname,
	 TempField1
Resident VACATION
Where TempField2 = 1;

Left Join (FinalTable)
LOAD Code,
	 CodeID,
	 FieldDate as To,
	 Empname,
	 TempField1
Resident VACATION
Where TempField2 = 0;

DROP Table VACATION;
d_koti24
Creator II
Creator II
Author

Thank you stalwar