Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have an excel sheet with 3 columns (containing text only): Category, PrimaryDomain, and SecondaryDomain. Every Category has one or two domains, so PrimaryDomain always has a value, but SecondaryDomain only has a value sometimes. I would like any calculations made in the Qlikview document associate a Category as having one or two Domains, but it's not loading right. I'm trying to test it in a document with less data to test the theory.
Here's my test load statement:
LOAD Category,
PrimaryDomain as Domain
FROM
(ooxml, embedded labels, table is Sheet1);
LOAD Category,
If( IsText(SecondaryDomain), SecondaryDomain) as Domain
FROM
(ooxml, embedded labels, table is Sheet1);
On my test document which uses this script, Categories which only have one Domain are loading as if they have two values for Domain: the PrimaryDomain value and NULL. (The test QVW is attached.)
Any suggestions on how to remove the NULL value and/or how to essentially two excel columns into one field with correct connections?
Try with this
LOAD Category,
PrimaryDomain as Domain
FROM
(ooxml, embedded labels, table is Sheet1);
LOAD Category,
SecondaryDomain as Domain
FROM
(ooxml, embedded labels, table is Sheet1)
WHERE Len(Trim(SecondaryDomain)) > 0;
Try with this
LOAD Category,
PrimaryDomain as Domain
FROM
(ooxml, embedded labels, table is Sheet1);
LOAD Category,
SecondaryDomain as Domain
FROM
(ooxml, embedded labels, table is Sheet1)
WHERE Len(Trim(SecondaryDomain)) > 0;
That did the trick! Thanks