Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
Im developing a QS app in QS Enterprise server. I have multiple variables that are frequently summed. When I use the syntax I am used to it only sums the first part.
Example:
Variables:
vVar1 = 3
vVar2 = 5
Result I am getting (last should obviously be 8):
| EXPRESSION used | =$(vVar1) | =$(vVar2) | =$(vVar1)+$(vVar2) |
| RESULT | 3 | 5 | 3 |
If I flip the variables around ($(vVar2)+$(vVar1)) I get 5 as a result.
I tried different syntaxes, all return an error or nothing.
What I tried:
Everything return an error or a " - " cell, except the above method which only sums the first one.
Any idea's?
Thanks!
What happens when you use RangeSum()?
RangeSum($(vVar1), $(vVar2))
Hi Sunny,
It returns an empty value (-) 😞
Dawid
Would you be able to share a sample where we can see this behavior? On another note, do you need dollar sign expansion? Can you try this?
RangeSum(vVar1, vVar2)
As I'm fully on server with database data, I would need to re-create everything from scratch. I'll see if I can work something out.
Unfortunately, using the rangesum without the expansion doesn't work either.
Maybe I should mention de variables are set analysis:
sum({$<financials_state={"Actual"}, costType={"DirectCost"}>} financials_amount_euro_tax_excl )
sum({$<financials_state={"Actual"}, costType={"IndirectCost"}>} financials_amount_euro_tax_excl )
I am just trying to throw out different ideas for you to try... does this work? basically adding extra parenthesis around each variable.
($(vVar1)) + ($(vVar2))or
RangeSum(
($(vVar1)), ($(vVar2))
)
Jup, thanks for the troubleshoot Sunny! Neither the first nor the second, both return " - ".
However I notice you don't use = sign when inserting variable. I always have " =$(vVar) in all cases and have NO equal sign in variable definition. This is the way it works for me (well, until now).
Can this be an indication?
Ya, you can try adding an equal sign and see if that works
=($(vVar1)) + ($(vVar2))or
=RangeSum(
($(vVar1)), ($(vVar2))
)
What I mean is, I always use the equal sign. Don't really know the difference but that's the way I've always done it.
Removing or adding the equal sign doesn't help 😞
Can you post screenshots to show the issue? It is difficult to know what you might have without seeing it