Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi everyone,
I have a CSV table with duplicate column names and Qlik refuses to load those fields, throwing the error from the title. Now, data-wise, I actually want all data within those columns to be loaded under the same field name. What can I do in the Data Load Editor to obtain this result?
E.g., I have this piece of data:
Name, Name, Name, Planet
Chris, John, Mary, Earth
I want to have it loaded in Qlik as it is and in the visualization use a *single* field name to refer to Chris, John and Mary. That field name would be "Name". Any thoughts on how I might achieve this?
Thanks,
Chris
Try something like
CrossTable (FieldName, Name)
LOAD Planet, Name, Name, Name INLINE [
Name, Name, Name, Planet
Chris, John, Mary, Earth
];
DROP FIELD FieldName;
edit: sorry, this is only half way solution and will not work as is . what's your data source, an excel or text file?
Hi Stefan,
Unfortunately the resulting data looks like this:
Chris and John are out of the equation
My source file is a CSV
Try using the DataManager and load with ',' as separator, using positional columns instead of column names
For an excel fiel, it could lok like
CrossTable (Field, Name)
LOAD D as Planet, A, B, C
FROM [MultipleFieldNames.xlsx] (ooxml, no labels, header is 1 lines, table is Tabelle1);
DROP FIELD Field;
and for your txt file maybe
CrossTable (Field, Name)
LOAD @4 as Planet, @1, @2, @2
FROM [MultipleFieldNames.csv] (txt, no labels, header is 1 lines, delimiter is ',');
DROP FIELD Field;
or use the wizard like shown above and then apply the CROSSTABLE.
edit: edited format code