Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello, I'm new to Qlik Sense and I'm trying to create new data fields via the Data Load Editor.
Below is the auto script:
LOAD
CustomerID,
SubCustomerID,
FROM [FILEPATH.qvd]
(qvd);
In some cases the CustomerID is blank, so I would like to create a new field MyCustomerID, which would equal the CustomerID where it exists and the SubCustomerID where CustomerID is null. Feels easy, but I'm new to this language.
Thanks,
Adam
Try something like this using the len function to find empty CustomerID fields.
LOAD
CustomerID,
SubCustomerID,
if(len(CustomerID) =0, SubCustomerID, CustomerID) as MyCustomerID
FROM [FILEPATH.qvd]
(qvd);
You could also use the isnull function depending on how the empty fields are valued.