Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello all,
I am currently working on a Qlik visualization that utilizes about 800 rows of data regarding shipments to African countries. I am planning on creating a pie chart to show the different ratios. However, my other graphs in the dashboard have countries such as Sierra Leone and Guinea written completely whereas this new Excel data sheet with the 800 rows has them labeled "sl" and "gn" in each individual. As it would be both extraneous and tedious to go row-by-row changing the names of each country, I was wondering if there was any easier way to do this. I will attach a picture below of my current dashboard for more insight. I appreciate any help and thanks again!
Sincerely,
Munna
[TOTAL SHIPMENTS]:
LOAD [Shipment Quantity In BUM],
If(WildMatch(Country,'sl*'),'Sierra Leone',
If( WildMatch(Country,'gn*'),'Guinea','Liberia')) as Country
FROM [lib://Downloads/dr-ebolashipments-materiallineitems-07222014to12312014.xlsx]
(ooxml, embedded labels, table is Sheet0);
Did This Work For You??
Load
If(WildMatch(Country,'sl*'),'Sierra Leone',
If(WildMatch(Country,'gn*'),'Guinea'),'Liberia') as Country
From ExcelTable;
Thank you for your suggestion, however, I am still getting an error when I tried inserting that code into the data load editor. I'm attaching a screenshot as well.
Remove the line
[Country]
Hi Debashish,
I just gave you the sample code you must be very new to Qlik
Can You please post the script you had earlier then I would make the changes and will post back
[TOTAL SHIPMENTS]:
LOAD [Shipment Quantity In BUM],
[Country]
FROM [lib://Downloads/dr-ebolashipments-materiallineitems-07222014to12312014.xlsx]
(ooxml, embedded labels, table is Sheet0);
hi, comma is missing after Country field.
Hello,
I removed the [Country] line and added a comma afterwards. However, I am still getting an error.
Hi,
you used bracket in a wrong position:
Try this:
If(WildMatch(Country,'sl*'),'Sierra Leone',
If( WildMatch(Country,'gn*'),'Guinea','Liberia') as Country
[TOTAL SHIPMENTS]:
LOAD [Shipment Quantity In BUM],
If(WildMatch(Country,'sl*'),'Sierra Leone',
If( WildMatch(Country,'gn*'),'Guinea','Liberia')) as Country
FROM [lib://Downloads/dr-ebolashipments-materiallineitems-07222014to12312014.xlsx]
(ooxml, embedded labels, table is Sheet0);