Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 
					
				
		
 pamaxeed
		
			pamaxeed
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi guys,
is there a way to split the following Dimension Value:
Dim1:a;Dim2:x;
in the following output that i can have my table in qlikview like that:
| Dim1 | Dim2 | 
|---|---|
| a | x | 
Do I need to use Generic Load Prefix?
Thanks,
Patric
 sunny_talwar
		
			sunny_talwar
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		May be this:
TableInput:
LOAD SubField(SubField(SubField(Field1, ';', 1), ':', 2), ',') as DIM1,
SubField(SubField(SubField(Field1, ';', 2), ':', 2), ',') as DIM2;
LOAD * Inline [
Field1
Dim1:1,2;Dim2:1
] (delimiter is |);
Output
 sunny_talwar
		
			sunny_talwar
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Generic prefix is one option. Or you can alos do this:
Table1:
LOAD Dim1
FROM yourTable;
Table2:
LOAD Dim2
FROM yourTable;
 
					
				
		
 pamaxeed
		
			pamaxeed
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Is that working?
For instance my field could be also like that:
Field1: Dim1:1,2;Dim2:1;
So we have more values for Dim1 for instance and it should be translated in the right table output like above:
FIELD1 DIM1 DIM2
Dim1:1,2;Dim2:1; 1 1
Dim1:1,2;Dim2:1; 2 1
 sunny_talwar
		
			sunny_talwar
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		It should. Are you looking to do this in the script or front end of the application?
 
					
				
		
 miguelbraga
		
			miguelbraga
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi Patric,
You can use this:
For Dim1:
=Left('Dim1:a;Dim2:x;', 4)
For Dim2:
=Mid('Dim1:a;Dim2:x;', 8, 4)
For expression to get "a" field:
=Mid('Dim1:a;Dim2:x;', 6, 1)
For expression to get "x" field:
=Mid('Dim1:a;Dim2:x;', 13, 1)
Regards,
MB
 
					
				
		
 pamaxeed
		
			pamaxeed
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		In the script my Input is like that:
TableInput:
Field1
Dim1:a;Dim2:x;;
Input:
Load Field1
From Dummy;
Output:
Load .......
Drop table Input;
where the output table looks like this:
FIELD1 DIM1 DIM2
Dim1:1,2;Dim2:1; 1 1
Dim1:1,2;Dim2:1; 2 1
Cheers,
Patric
 
					
				
		
 pamaxeed
		
			pamaxeed
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		The problem is that the proposed solution is not flexible:
I have to have a generic solution, this means that my input key field can look also like that:
Field1
Asterix:1,2,3;Position:a,b,x;
Patric
 
					
				
		
 miguelbraga
		
			miguelbraga
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Like this:
 
					
				
		
 pamaxeed
		
			pamaxeed
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Sry that is not working for me.
I have to have a generic solution.
 
					
				
		
 miguelbraga
		
			miguelbraga
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		I'll take a look if there is a way to solve your problem 
