Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Team,
Thanks in Advance,
I need help on below requirement.
Please find the attached document for the reference and how to implement in qlikview.
Thanks,
D
LOAD ID,
[update date1],
type1
FROM
Book1.xlsx
(ooxml, embedded labels, header is 1 lines, table is Sheet1)
Where [update date1] <> '-';
Left Join
LOAD ID,
[updated date2],
type2
FROM
Book1.xlsx
(ooxml, embedded labels, header is 1 lines, table is Sheet1)
Where [updated date2] <> '-';
Hi Manish,
Thanks for reply,
I was tried your code and getting below error:
Field not found<update date1> and <update date2>
Please help me on this
Regards,
D
Hi,
Please find the attached script which I used it.
Regards,
D
Try to load like this
Tab1:
LOAD * INLINE [
ID, update date1, updated date2, type1, type2
123, 3/12/2012, -, X, -
123, -, 3/15/2012, , Y
234, 4/20/2012, -, X, -
234, -, 4/25/2012, , Y];
NoConcatenate
New:
LOAD
ID,
[update date1],
type1
Resident Tab1
Where [update date1] <> '-';
Left Join
LOAD
ID,
[updated date2],
type2
Resident Tab1
Where [updated date2] <> '-';
DROP Table Tab1;
And use correct field name from your source.
Regards
If you want just a n ID by group, I think you can try with a simple group by
Tab1:
load ID,
if(trim([update date1])='-', null(), [update date1]) as [update date1],
if(trim([update date2])='-', null(), [update date2]) as [update date2],
type1,
type2;
LOAD * INLINE [
ID, update date1, update date2, type1, type2
123, 12/03/2012, -, X, -
123, -, 15/03/2012, , Y
234, 20/04/2012, -, X, -
234, -, 25/04/2012, , Y];
Tab:
NoConcatenate
load
ID,
Max([update date1]) as [update date1],
Max([update date2]) as [update date2],
MaxString(type1) as type1,
MaxString(type2) as type2
Resident
Tab1
Group by ID;
DROP Table Tab1;
Check your Excel File. It may be possible, that the fieldname you have provided to us is different than your actual file...