Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 QSMACHBI
		
			QSMACHBI
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi ,
I need your help guys,
I have a variable named : vIsPreviousPeriode
When I use this variable in a set expression to feed a column in a table objet, I don't get the good result ! (all the time 0 value !!!)
1. First I calculate the vIsPreviousPeriode
2. I use this syntax : =SUM({$<Myfield = {$(=vIsPreviousPeriode)}>} Mymeasure)
 sunny_talwar
		
			sunny_talwar
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		What is Myfield? and how do you define your variable?
 QSMACHBI
		
			QSMACHBI
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		When I write the value's string for testing, iI have athe right response :
=SUM({$<Myfield = {"JUN-17"}>} Mymeasure) ===> Ok.
=SUM({$<Myfield = {$(=vIsPreviousPeriode)}>} Mymeasure) ===> 0 (wrong)!
 QSMACHBI
		
			QSMACHBI
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		MyField is a field in my logical table
 QSMACHBI
		
			QSMACHBI
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		vIsPreviousPeriode is a variable defined in varibales Editor (Qlik Sense)
 sunny_talwar
		
			sunny_talwar
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Is MyField read as a date field by QlikView or Qlik Sense (whichever you are using)?
 QSMACHBI
		
			QSMACHBI
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		MyField is a string (Qlik Sense)
 sunny_talwar
		
			sunny_talwar
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		How do you create this in the script?
vIsPreviousPeriode
 QSMACHBI
		
			QSMACHBI
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		The varibale is declared in the Qlik expression -variables (User interface) not in the Load editor
The variable «vIsPreviousPeriode» is delared like that :
$(vIsCurrentMonthPeriode)&'-'&Right($(vIsPreviousYear),2)
vIsPreviousPeriode will store values like these : JUN-17 ; JUL-17 ; REG-16;...
 sunny_talwar
		
			sunny_talwar
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Try this
=Sum({$<Myfield = {"$(=vIsPreviousPeriode)"}>} Mymeasure)
