Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

guilhermetiscos
New Contributor II

Subtract the result of expressions in 2 variables

Hello,

I have 2 variables: vSumSales and vSumReturned that contain the expressions that returns respectively the sum of sales and sum of returned sales. Using them individually in a straight table works as expected, but when I try to find the difference between the values, the result is what I expect it to be. This is how things are now:

Expression 1: $(vSumSales) = 12.898.970,46

Expression 2: $(vSumReturned) = 130.625,33

Expression 3: $(vSumSales) - $(vSumReturned) = 12.855.488,03 (the correct result should be 12.768.345,13)

Am I using the wrong syntax on expression 3?

att,

1 Solution

Accepted Solutions

Re: Subtract the result of expressions in 2 variables

Try: alt($(vSumSales), 0) - alt($(vSumReturned), 0)

- Marcus

2 Replies

Re: Subtract the result of expressions in 2 variables

Try: alt($(vSumSales), 0) - alt($(vSumReturned), 0)

- Marcus

Re: Subtract the result of expressions in 2 variables

Give us other details of your straight table please

Community Browser