Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
KharansuR93
Contributor II
Contributor II

Using a column as a different column

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

 

4 Replies
Qlik1_User1
Specialist
Specialist

@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.

KharansuR93
Contributor II
Contributor II
Author

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

Qlik1_User1
Specialist
Specialist

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.

KharansuR93
Contributor II
Contributor II
Author

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');