Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 LucaB-1991
		
			LucaB-1991
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi everyone,
I need some help!
In qlik senso how can I extract years’values from a multiple selected YearMonth values?
For example:
If the user selects 201701, 201801,201901 from YearMonth filter box, in set analysis I want this behaviour : Year = {2017, 2018, 2019}.
Is there a way to achive this ?
 tresesco
		
			tresesco
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		You can use a variable or the expression directly in set analysis.
= '{' & Concat(Distinct Left(YearMonth,4), ',' ) & '}'
 DavidM
		
			DavidM
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		If YearMonth is $date type field you can do it with function Year(). Or you can use just left:
Year = {"=Left( [Year] ,4)"}
 tresesco
		
			tresesco
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		You can use a variable or the expression directly in set analysis.
= '{' & Concat(Distinct Left(YearMonth,4), ',' ) & '}'
 LucaB-1991
		
			LucaB-1991
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Thank you very much.
It works!
