Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Good day QlikCommunity,
Is it possible to make a new variable? I want to create a variable Sum if I add my TotalPay and penalty.
Please leave your comment and advice.
Thanks in advance
Yes we can create one variable:
Variable Overview(Ctrl+Alt+v) new variable
vExpression
Value: TotalPay + penalty
In chart expression use variable instead of expression: $(vExpression)
Could you give more details?
Do you want to create this variable in scrip or front end?
hi,
can u provide exac output snap shot.
and sample data if possible.
Thank you
Suresh
Hi Robert,
I want to create the Sum of TotalPay and Penalty on Script.
By the way here is the table. My expression on the sum is TotalPay+penalty, Is it possible to create a new variable to use it as an expression?
Thanks in advance sir
year1 | qtr1 | payee | TotalPay | penalty | TotalPay + penalty |
Total | Total | Total | 81201.48 | 6960.06 | 88161.54 |
2013 | 1 | 183.78 | 57.9 | 241.68 | |
2013 | 1 | xxxx | 4704.12 | 1482.12 | 6186.24 |
2013 | 2 | 178.74 | 52.86 | 231.6 | |
2013 | 2 | xxxx | 4575.24 | 1353.24 | 5928.48 |
2013 | 3 | 171.2 | 45.32 | 216.52 | |
2013 | 3 | xxxx | 4381.92 | 1159.92 | 5541.84 |
2013 | 4 | 163.68 | 37.78 | 201.46 | |
2013 | 4 | xxxx | 4188.6 | 966.6 | 5155.2 |
2014 | 1 | xxxx | 3995.28 | 773.28 | 4768.56 |
2014 | 2 | xxxx | 3866.4 | 644.4 | 4510.8 |
2014 | 3 | xxxx | 3608.64 | 386.64 | 3995.28 |
2014 | 4 | xxxx | 2899.8 | 0 | 2899.8 |
2015 | 1 | Allen Chi Ong | 128.52 | 0 | 128.52 |
2015 | 1 | George A. ong | 20.4 | 0 | 20.4 |
2015 | 1 | Marlyn Serrano | 40.8 | 0 | 40.8 |
2015 | 1 | Patricia Sabrina Narciso | 193.8 | 0 | 193.8 |
2015 | 1 | Rolando Balle & Rosemarie | 11687.5 | 0 | 11687.5 |
2015 | 2 | Allen Chi Ong | 128.52 | 0 | 128.52 |
2015 | 2 | George A. ong | 20.4 | 0 | 20.4 |
2015 | 2 | Marlyn Serrano | 40.8 | 0 | 40.8 |
2015 | 2 | Patricia Sabrina Narciso | 193.8 | 0 | 193.8 |
2015 | 2 | Rolando Balle & Rosemarie | 11687.5 | 0 | 11687.5 |
2015 | 3 | Allen Chi Ong | 128.52 | 0 | 128.52 |
2015 | 3 | George A. ong | 20.4 | 0 | 20.4 |
2015 | 3 | Marlyn Serrano | 40.8 | 0 | 40.8 |
2015 | 3 | Patricia Sabrina Narciso | 193.8 | 0 | 193.8 |
2015 | 3 | Rolando Balle & Rosemarie | 11687.5 | 0 | 11687.5 |
2015 | 4 | Allen Chi Ong | 128.52 | 0 | 128.52 |
2015 | 4 | George A. ong | 20.4 | 0 | 20.4 |
2015 | 4 | Marlyn Serrano | 40.8 | 0 | 40.8 |
2015 | 4 | Patricia Sabrina Narciso | 193.8 | 0 | 193.8 |
2015 | 4 | Rolando Balle & Rosemarie | 11687.5 | 0 | 11687.5 |
Hi,
We can create variable in 2 ways:
Alt+Ctrl+V(Variable Overview) click on new variable->value
Using Set and Let in script.
Hi Suri,
I provided the table up there. I want to know is it possible to make a variable and use it to expression to show the Sum of two data.
Hi Sasi,
can you teach me how it is done in script??
Yes we can create one variable:
Variable Overview(Ctrl+Alt+v) new variable
vExpression
Value: TotalPay + penalty
In chart expression use variable instead of expression: $(vExpression)
in script,
enter like SET vExpression=TotalPay + penalty;
and after reload only we can use the variable.
In chart expression use variable like $(vExpression) instead of direct expression.
Or else u can add variabel using variable overview as well and for this not required any reload.