
Store formulas in variable
Rob Wunderlich Oct 7, 2011 12:23 PM (in response to Carlo A. Babini )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

Store formulas in variable
Jasleen Puri Oct 7, 2011 12:24 PM (in response to Carlo A. Babini )Hi Carlo, you can store the expressions in an xl spreadsheet and read these expressions in your script.

Store formulas in variable
Anand Chouhan Oct 7, 2011 12:26 PM (in response to Carlo A. Babini )Hi,
Yes you can
make a variable named QTY_SUM = Sum(QTY)
And use this variable in any expression like $(QTY_SUM)
Rgds
Anand

Re: Store formulas in variable
Anand Chouhan Oct 7, 2011 12:30 PM (in response to Carlo A. Babini )Hi,
See the sample file
Rgds
Anand

QTY.qvw 117.5 K

Store formulas in variable
Carlo A. Babini Oct 7, 2011 12:32 PM (in response to Anand Chouhan )Thank you all very much, I was not able to reference the variable in the expression
Regards

Re: Store formulas in variable
Anand Chouhan Oct 7, 2011 12:38 PM (in response to Carlo A. Babini )Hi,
You have to use the values of stored variables in expression like
See the attached sample file
Rgds
Anand

QTY.qvw 120.2 K


Re: Store formulas in variable
Jasleen Puri Oct 7, 2011 1:07 PM (in response to Carlo A. Babini )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 casesensitive. It maybe something as small as this that maybe hampering the ref.



Re: Store formulas in variable
Anand Chouhan Oct 7, 2011 12:32 PM (in response to Carlo A. Babini )Hi,
You can use any type of formulas like Max,Min,Sum,Count etc
See the attached sample file.
Rgds
Anand

QTY.qvw 118.2 K
