Discussion Board for collaboration related to QlikView App Development.
I have the following code and loading in some data into a cross table as shown below:
So I am loading the [Business Units] into the Data field and transposing this. However I then need this transposed Data field to then be split in two separate chunks.
So eg. the Business Unit is "England-London" and I need to split is in England and London in two separate fields.
I am missing something to complete my coding to be in the likes of:
left([Business Units],Index([Business Units], '-')-1)) as Country,
right([Business Units],Index([Business Units], '-'))) as City
Hope this makes sense!
Thank you for your help.
do per assunto che la crosstable funzioni, per cui prova il seguente script:
Left([Business Units],index([Business Units],'-')) as Country,
Mid([Business Units],index([Business Units],'-')+1) as City,
Drop table Tester_File;
View solution in original post
First do the crosstable stuff, then use that table to create a new one and split the Business Units field in the second load that creates that new table. Something like this:
Load ... etc
subfield([Business Units],'-',1) as Country,
subfield([Business Units],'-',2) as City
Drop Table Temp;
//Drop field [Business Units];