Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 
					
				
		
 surajap123
		
			surajap123
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi,
I have a table of data in qlikview where some fields have values that are comma seperated.
I want each comma seperated value to be in seperate rows in the field. The screenshot shows only 2 fields Names, Cities, but the real data has 7 fields.
When i try to use subfield function like below it works for the 1st field, but from 2nd field it does many to many cartesian product.
SubField(Names, ',') AS Name
Can you please suggest.
 JandreKillianRI
		
			JandreKillianRIHi @surajap123
I don't see the screenshot?
Regards Jandre
Mark the solution as accepted that solved your problem and if you found it useful, press the like button! Check out my YouTube Channel | Follow me on LinkedIn
 
					
				
		
 surajap123
		
			surajap123
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		sorry. Just attached.
 JandreKillianRI
		
			JandreKillianRIHi @surajap123
Is there any relation to the ID1, Alice vs the City, Just running a Subfield on both you will get 9 values for ID1. (3 Names multiplied by 3 Cities)
Can you perhaps give your expected outcome / table?
Regards Jandre
Mark the solution as accepted that solved your problem and if you found it useful, press the like button! Check out my YouTube Channel | Follow me on LinkedIn
 
					
				
		
 surajap123
		
			surajap123
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi JandreKillianRI
The output you have shown is exactly what i am expcting. Could you provide the code. Thanks
 JandreKillianRI
		
			JandreKillianRIHi @surajap123
You might need to drop the Temp table if do you need the original data stuff.
See below
Mark the solution as accepted that solved your problem and if you found it useful, press the like button! Check out my YouTube Channel | Follow me on LinkedIn
 ali_hijazi
		
			ali_hijazi
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		use Subfield for both Name and Cities fields
 
					
				
		
 surajap123
		
			surajap123
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Thanks. When this table links is connected to other table in the model, it shows cartesion product(many to many).
Thanks for your help with the table.
 JandreKillianRI
		
			JandreKillianRIHi @surajap123
Glad this worked for you.
Please mark the reply that contains the solution as a solution to "close" this community thread.
Regards Jandre
Mark the solution as accepted that solved your problem and if you found it useful, press the like button! Check out my YouTube Channel | Follow me on LinkedIn
