Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Dear All,
Unable to sum two variables. Please assist.
I have tried the following after Creating a new variable V_tester in the Variables Overview
V_tester = $(Var_1) + $(Var_2)
andl
V_tester = Var_1 + Var_2
This is in Qlikview and not in the script.
Please sugesst how do I add.
With regards
One of the fastest ways of debugging your expressions and variables is by using an INPUT BOX. The input box can show several variables at once and any type of QlikView expression can be written and evaluated directly in an input box.
Create a new input box and add your three variables like this:
![2017-01-08 13_34_25-QlikView x64 - [QV1].png](/legacyfs/online/148695_2017-01-08 13_34_25-QlikView x64 - [QV1].png)
![2017-01-08 13_34_40-QlikView x64 - [QV1].png](/legacyfs/online/148696_2017-01-08 13_34_40-QlikView x64 - [QV1].png)
![2017-01-08 13_35_19-QlikView x64 - [QV1].png](/legacyfs/online/148697_2017-01-08 13_35_19-QlikView x64 - [QV1].png)
Then you can immediately inspect all three variables and modify them to see what it evaluates to.
Example - if you have the two variables Var_1 and Var_2 populated with 456 and 890:
![2017-01-08 13_38_08-QlikView x64 - [QV1].png](/legacyfs/online/148699_2017-01-08 13_38_08-QlikView x64 - [QV1].png)
![2017-01-08 13_38_31-QlikView x64 - [QV1].png](/legacyfs/online/148700_2017-01-08 13_38_31-QlikView x64 - [QV1].png)
It might seem like your variables don't evaluate to numbers - thus adding them together will not give you a numeric result - possibly and error. Like this:
![2017-01-08 13_41_25-QlikView x64 - [QV1].png](/legacyfs/online/148701_2017-01-08 13_41_25-QlikView x64 - [QV1].png)
For me Input Box is an invaluable aid in getting my expressions correct and saving a lot of time while debugging them.
Try below
V_tester = $(=Var_1) + $(=Var_2)
or
=rangesum( $(=Var_1) , $(=Var_2))
please also post expression for these two variables if the issue persists
One of the fastest ways of debugging your expressions and variables is by using an INPUT BOX. The input box can show several variables at once and any type of QlikView expression can be written and evaluated directly in an input box.
Create a new input box and add your three variables like this:
![2017-01-08 13_34_25-QlikView x64 - [QV1].png](/legacyfs/online/148695_2017-01-08 13_34_25-QlikView x64 - [QV1].png)
![2017-01-08 13_34_40-QlikView x64 - [QV1].png](/legacyfs/online/148696_2017-01-08 13_34_40-QlikView x64 - [QV1].png)
![2017-01-08 13_35_19-QlikView x64 - [QV1].png](/legacyfs/online/148697_2017-01-08 13_35_19-QlikView x64 - [QV1].png)
Then you can immediately inspect all three variables and modify them to see what it evaluates to.
Example - if you have the two variables Var_1 and Var_2 populated with 456 and 890:
![2017-01-08 13_38_08-QlikView x64 - [QV1].png](/legacyfs/online/148699_2017-01-08 13_38_08-QlikView x64 - [QV1].png)
![2017-01-08 13_38_31-QlikView x64 - [QV1].png](/legacyfs/online/148700_2017-01-08 13_38_31-QlikView x64 - [QV1].png)
It might seem like your variables don't evaluate to numbers - thus adding them together will not give you a numeric result - possibly and error. Like this:
![2017-01-08 13_41_25-QlikView x64 - [QV1].png](/legacyfs/online/148701_2017-01-08 13_41_25-QlikView x64 - [QV1].png)
For me Input Box is an invaluable aid in getting my expressions correct and saving a lot of time while debugging them.
Hi,
What are the values you are getting in the two variables Var_1 + Var_2? Check it by using Text Objects or by using Input boxes.
If you are getting one of the variable value as Null, then better use RangeSum()
=RangeSum(Var_1, Var_2)
Hope this helps you.
Regards,
Jagan.
Dear Petter,
Thanks for the method used... This assists in the overall development perspective a lot.
Thanks also to Jagan and Vineet...