Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 trishita
		
			trishita
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		
I need to map two fuel types FIELD from 2 tables, Sounding correction and Summary depending on the sulphur content of the sounding correction table.How can I map these two tables using mapping function and apply map with conditional expression
| Sounding Correction.Fuel Type | Sounding Correction.Sulphur Content | Summary.Fuel Type | 
| DMA | <.01 | LSDO | 
| DMB | <.01 | LSDO | 
| DMC | <.01 | LSDO | 
| DMA | >.01 | HSDO | 
| DMB | >.01 | HSDO | 
| DMC | >.01 | HSDO | 
| RMA | <.01 | ULSFO | 
| RMG | <.01 | ULSFO | 
| RMD | <.01 | ULSFO | 
| RMA | >.01 | HSFO | 
| RMG | >.01 | HSFO | 
| RMD | >.01 | HSFO | 
If (Sounding Correction.Fuel Type = ‘DM*’) and (Sounding Correction.Sulphur Content)
Greater than 0.1 , Summary.Fuel Type = ‘HSDO’
Or else ‘LSDO’
If (Sounding Correction.Fuel Type = ‘RM*****’) and (Sounding Correction.Sulphur Content)
Greater than 0.1 then (Summary.Fuel Type) = ‘HSFO’
Or else ‘ULSFO’
 
					
				
		
 olivierrobin
		
			olivierrobin
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		hello
something like
if(wildmatch([Sounding Correction.Fuel Type ],' ‘DM*’) and [(Sounding Correction.Sulphur Content) ],'HSDO','LSDO') as .....
same logic for the 2nd expression
 trishita
		
			trishita
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		But I want to do it with mapping function, is it possible? secondly HSDO and LSDO will come from the other table, not just any string expression...
my main goal is to map these two tables which have different codes for Fuel type
 
					
				
		
 olivierrobin
		
			olivierrobin
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		you can code a similar logic tu use applymap
eg:
if(some condition,applymp(code here parameters for yes cond), applymap(code here parameters for no cond)
 
					
				
		
Hi Trishita,
For apply map function is Applymap(tablename, mapping field, nofield)
Thanks Regards,
Ramesh.P
 shiveshsingh
		
			shiveshsingh
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Use this as your expression
if(WildMatch([Sounding Correction.Fuel Type], 'DM*') and [Sounding Correction.Sulphur Content] = '>.01','HSDO',
if(WildMatch([Sounding Correction.Fuel Type], 'DM*') and [Sounding Correction.Sulphur Content] <> '>.01','LSDO',
if(WildMatch([Sounding Correction.Fuel Type], 'RM*') and [Sounding Correction.Sulphur Content] = '>.01','HSFO',
if(WildMatch([Sounding Correction.Fuel Type], 'RM*') and [Sounding Correction.Sulphur Content] <> '>.01','ULSFO'))))
 trishita
		
			trishita
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		so I don't need to use mapping load or applymap for this?
 
					
				
		
 olivierrobin
		
			olivierrobin
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		of course, you must first
use map load to load your mapping tables
 trishita
		
			trishita
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi Oliver,
Can you show me any example like this? I could not find it in any qlikview help or such
 shiveshsingh
		
			shiveshsingh
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Why do you want to use mapping table? Do you want these calculations in script?
I have shared the expression for Straight table.
If you want to use it using mapping table, then it needs to be done in script. Do you have separate mapping table or something?
If you don't have any issues, you can do this in UI layer by using the expression
