Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Vedant_Patel
Contributor
Contributor

How to Remove Single Value from Field ?

eg...

We have country table including 

India, UK, USA, New Zealand, Germany, Japan ....

I want to remove USA from Country Table...

(I don't required Sales of USA in Final Table)..

 

What can I do ???  

Labels (3)
3 Replies
chaorenzhu
Creator II
Creator II

There are two ways.

First is on front end, if you don't need USA for all your calculation you can use something like

load * from XXX where country<>'USA'

Second on back end, say for your sales calculation if you want to exclude USA, you can use set analysis

sum({<country-={'USA'}>} sales)

sidhiq91
Specialist II
Specialist II

@Vedant_Patel You can use below code to get the desired output.

NoConcatenate
Country:
Load * Inline [
Country, Sales
India, 1000
UK, 2000
USA, 3000
New Zealand,4000
Germany, 5000
Japan,6000
];

NoConcatenate
Finaltable:

Load * Resident Country
where Country<>'USA';

Drop table Country;

Exit Script;

If this resolves your issue, please like and accept it as a solution.

zhaofeng
Partner - Creator
Partner - Creator

As you want to remove a single value from a field,you need to confirm whether it will affect your caculation of specific quotas.If not,you can use where clause in the script.