Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 micheledenardi
		
			micheledenardi
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi guys,
is there a way to use a field (in my case "Dim3" ) as teble name during an applymap() ?
I know that the table name must be enclosed by single quote but there is anybody which know any trick ?
I want to avoid join or concatenate solutions...
| Dim1 | Dim2 | Dim3 | Value1 | 
|---|---|---|---|
| A | AA | MappingTable1 | 1 | 
| B | BB | MappingTable2 | 2 | 
| C | CC | MappingTable3 | 3 | 
| D | DD | MappingTable4 | 4 | 
| E | EE | MappingTable5 | 5 | 
| F | FF | MappingTable6 | 6 | 
 sunny_talwar
		
			sunny_talwar
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Do you have a sample where we can test this out?
 
					
				
		
 jmvilaplanap
		
			jmvilaplanap
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi
You can define the table name as a variable with LET LET and SET
But I need a sample to see exactly what are you thinking to do.
Regards
 micheledenardi
		
			micheledenardi
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		I've attached the sample data
 sunny_talwar
		
			sunny_talwar
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		I guess not what you would like, but your best bet is this
FactTable:
LOAD Dim1,
Dim2,
Dim3,
Value1,
Pick(KeepChar(Dim2, '0123456789'),
ApplyMap('MappingTable1', Dim2),
ApplyMap('MappingTable2', Dim2),
ApplyMap('MappingTable3', Dim2),
ApplyMap('MappingTable4', Dim2),
ApplyMap('MappingTable5', Dim2),
ApplyMap('MappingTable6', Dim2)) as MappedValue2
FROM
[..\..\Downloads\SampleData.xlsx]
(ooxml, embedded labels, table is Foglio1);
 micheledenardi
		
			micheledenardi
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi Sunny,
thanks for you solution but i want to avoid fixed table name.
I have found this thread Qlik Tips: Dynamic ApplyMap but this approach do not work for me... i've tried in both qlikview and qliksense but when the script execution arrive at the applymap qlik is freezing.
