Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
guilhermetiscos
Contributor II
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
marcus_sommer

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

- Marcus

View solution in original post

2 Replies
marcus_sommer

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

- Marcus

alexandros17
Partner - Champion III
Partner - Champion III

Give us other details of your straight table please