Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I have a scenario where I have City column along with other columns like Country, State, Sales and Profit. Now I need to exclude some of the city names from the City column and store in another table so that it doesn't affect the 1st table and then bring it back to the 1st table as a different column like City2 or City_2 or whatever.
How can it be done?
Thanks,
Kharansu
@KharansuR93 Use nothmatch in backend scripting
Table1:
LOAD City, Country, State, Sales and Profit
FROM TableABC;
Table2:
LOAD City as City_2
Resident Table1 where not match(City,''City1,'city2','city3');
Note: In place of city1,city2,city3 enter city name which you want to exclude.
Hi Qlik1_User1, thanks for the reply and I have already tried the above written earlier but that satisfies the 1st half of my problem. The second and important part is, bring it back to the 1st table, so that it can be used as a different column.
Thanks,
Kharansu
Try this
Table1:
LOAD City, Country, State, Sales , Profit
FROM TableABC;
concatenate
LOAD City as City_2
Resident Table1 where not match(City,''City1,'city2','city3');
Note: We can also opt for join but for that joining key is required which is not present in your case.
Available columns to use are City, Country, State, Sales , Profit and non of these can be used as joining key.
Hi
I tried the below and it's working -
Table1:
LOAD City, Country, State, Sales , Profit
FROM TableABC;
Table2:
LOAD City as City_2
City
Resident Table1 where not match(City,''City1,'city2','city3');