Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have column data as below
Status:
School
College
University
Department
AXN (D&R) - Delhi
AXN (D&R) - Mumbai
AXN (D&R) - Goa
AXN (D&R) - Bangalore
AXN (D&R) - Kochin
AXN (D&R) - Agra
AXN (D&R) - NewJersey
AXN (D&R) - Washington
AXN (D&R) - Chennai
AXN (D&R) - Pune
I want to show in chart Status split to two columns as below
Status:
School
College
University
Department
Status_AXN:
AXN (D&R) - Delhi
AXN (D&R) - Mumbai
AXN (D&R) - Goa
AXN (D&R) - Bangalore
AXN (D&R) - Kochin
AXN (D&R) - Agra
AXN (D&R) - NewJersey
AXN (D&R) - Washington
AXN (D&R) - Chennai
AXN (D&R) - Pune
Please can anyone suggest me how to do this in chart?
Thanks.
Hello Amelia,
If that is really how the data will look like, then you can use a If() statement along with some text functions, for example:
Table:
LOAD
If(Left(Status, 3) = 'AXN', Status, null()) AS Status_AXN,
If(Left(Status, 3) <> 'AXN', Status, null()) AS Status
FROM Source;
If they are in the same table. Otherwise, a WHERE statement with similar functions.
Miguel
Do you want to split that column for a chart or that's how you want it to be within the data structure in QlikView?
Best,
S
Thanks. I used in script. When I am two columns in table it is showing blanks under Status_AXN column. please can help me.
I want to split the column for a chart
Hi,
If you want to split data into two columns use miguels solution.
else if you want to group data so use below code to create flags in script and use in ui to visualise:
if(wildmatch(fieldname,'AXN*'),Status_AXN,Status) as Status;
Regards
Neetha
Hi,
You can use same as Miguel,
just change the first if condition to If(wildmatch(Status,'*AXN*'), Status, null()) AS Status_AXN.
Hope you need this
regards,
Amay
Yes, because you are creating two new columns in the script, and depending on the value, one or the other will be populated, but never both. That's what I understood from your original post.
Miguel