Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 amigo007
		
			amigo007
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		I have one table and I need to create a flag/filter to show the difference between the values in 2 columns for the same row.
My table is in the following format:
| Id | Country1 | Country2 | 
|---|---|---|
| 1 | Finland | Portugal | 
| 2 | Germany | Germany | 
| 3 | Morocco | Finland | 
| 4 | Portugal | Morocco | 
So the flag can have 2 values, e.g. 'Same' and 'Different', i.e. if I click 'Same', only the 2nd row for Germany will be shown. Likewise, if I click 'Different', rows 1, 3 and 4 will be shown.
Any idea?
Thanks in advance.
 
					
				
		
 swuehl
		
			swuehl
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Or in an list box field expression (from <expression> dialog in field drop down on general tab):
=Aggr( If(Country1 = Country2, 'Same', 'Different') , Id)
 
					
				
		
 swuehl
		
			swuehl
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		LOAD
Id,
Country1,
Country2,
If(Country1 = Country2, 'Same', 'Different') as Flag
FROM ....;
 sunny_talwar
		
			sunny_talwar
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		May be like this
LOAD Id,
Country1,
Country2,
If(Country1 = Country2, 'Same', 'Different') as Flag
FROM ...
May be this?
LOAD Id, Country1, Country2, If(Country1 = Country2, 'Same','Different') as Welcome Inline [
Id, Country1 ,Country2
1, Finland ,Portugal
2, Germany ,Germany
3, Morocco ,Finland
4, Portugal, Morocco
];
 
					
				
		
 swuehl
		
			swuehl
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Or in an list box field expression (from <expression> dialog in field drop down on general tab):
=Aggr( If(Country1 = Country2, 'Same', 'Different') , Id)
 
					
				
		
 neha_shirsath
		
			neha_shirsath
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi,
Try this-
if(Country1=Country2,'Same','Diff')
Thanks,
Neha
 amigo007
		
			amigo007
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Thanks guys for your fast and efficient response.
