Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 
					
				
		
Hi all,
I am very new in Qlik, and I would like to know how to give my users predefined formulas that they can use in their expressions. For example, I want to create a variable named sum_qty = "sum(QTY)" and I want my user to use sum_qty in his expression, but I am not able to get it to work.
Thank you in advance
 
					
				
		
 rwunderlich
		
			rwunderlich
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Define the variable in one of two ways:
1. In the script:
SET sum_qty=sum(QTY);
2. In the Variable overview dialog.
Users then reference the variable in an expression as:
$(sum_qty)
-Rob
 
					
				
		
 rwunderlich
		
			rwunderlich
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Define the variable in one of two ways:
1. In the script:
SET sum_qty=sum(QTY);
2. In the Variable overview dialog.
Users then reference the variable in an expression as:
$(sum_qty)
-Rob
 
					
				
		
Hi Carlo, you can store the expressions in an xl spreadsheet and read these expressions in your script.
 its_anandrjs
		
			its_anandrjs
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi,
Yes you can
make a variable named QTY_SUM = Sum(QTY)
And use this variable in any expression like $(QTY_SUM)
Rgds
Anand
 its_anandrjs
		
			its_anandrjs
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi,
See the sample file
Rgds
Anand
 
					
				
		
Thank you all very much, I was not able to reference the variable in the expression
Regards
 its_anandrjs
		
			its_anandrjs
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi,
You can use any type of formulas like Max,Min,Sum,Count etc
See the attached sample file.
Rgds
Anand
 its_anandrjs
		
			its_anandrjs
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi,
You have to use the values of stored variables in expression like
See the attached sample file
Rgds
Anand
 
					
				
		
It would be a good idea to check the way you are defining the variables and the way you are using them as qv is case-sensitive. It maybe something as small as this that maybe hampering the ref.
