Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I m facing problem where the header and data separately in 2 different source. How can I join both files in Qlik View as single data with header?
Hi
Use below function to load your file.
rename fields
@1 to ID ,
@2 to REG_NUMBER
;
First load the data file(Not header) in QV and then using excel create this syntax by concatenation
@1 to ID
@2 to REG_NUMBER
so on..
As there are no column names on your source is not clear how you want them linked or joined.
They do not necessarily need to be joined in QV, as they will associate via common fields. Simply load each file using alias names like:
Header:
LOAD @1 as NameOfField1,
@2 as NameOfField2,
...
Table:
LOAD @1 as NameOfField1,
@2 as NameOfField2,
...
If you need to join them, replace the second table name by
Join(Header)
Inner Join(Header)
Left Join(Header)
The join will be on the common field names.
I think I would create a mapping-table from the header and renaming within it the fields from data-load maybe in this way:
Header:
crosstable(Field, Fieldname, 1)
LOAD 'Dummy' as Dummy, *
FROM [VEHICLE Header.TXT] (txt, codepage is 1252, no labels, delimiter is '\t');
MapRenameFields:
mapping load Field, Fieldname resident Header;
drop tables Header;
Data:
load * FROM [VEHICLE Data.TXT] (txt, codepage is 1252, no labels, delimiter is '\t');
rename fields using MapRenameFields;
- Marcus