Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hey folks.
I have a situation where I need to join a bunch of similar, but not identical, report files into a single.QVD. I've been renaming headers with python before loading but now my boss wants me to get rid of the python step and do it all in Qlik.
The issue is that it's a bunch of .CSV files with slightly different header names. For example "Customer #" vs "Customer number" vs "Client No." There's no option to get these to come in harmonized because they're from different vendors.
I was trying to do something like: Load Distinct If(exists('Customer #'), 'Customer #') as CustomerNumber If(exists('Client No.'), 'Client No.') as CustomerNumber
But I get an error about the headers not being unique even though I'd expect the If() to return nothing when the Exists() condition fails.
Moving the "as CustomerNumber" inside the If() statement is a syntax error.
Is there a way to do this without making temporary tables and conctenating? I'm now doing it this way and it's working but it seems inelegant and like it's more steps than should be needed.
Thanks!
Use the Alias Statement to map the variations. https://help.qlik.com/en-US/sense/February2024/Subsystems/Hub/Content/Sense_Hub/Scripting/ScriptRegu...
Alias "Customer number" as "Customer #", "Client No." as "Customer #";
More: https://qlikviewcookbook.com/2018/12/loading-varying-column-names/
-Rob
http://www.easyqlik.com
http://masterssummit.com
http://qlikviewcookbook.com