Skip to main content
Announcements
Save $600 on Qlik Connect registration! Sign up by Dec. 6 to get an extra $100 off with code CYBERSAVE: REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
effinty2112
Master
Master

Dollar Sign Expansion, Problem with arithmetic on the result

Hello,

I have variable with a parameter: eSQMTotalforYear($1) with formula :

Sum({$<$(=eYear) = {$(=-$1+max($(=eYear)))}>} Qty*[Chargeable Unit SQM])

I get the answer I want. A textbox containing: =$(eSQMTotalforYear(0)) returns 871541.71999991 which is correct.

The problem I have is that I can't perform any arithmetic on the result.

I wanted the difference between this year and last but a textbox containing: =$(eSQMTotalforYear(0)) - $(eSQMTotalforYear(1)) disregards

the second half of the expression and I get 871541.71999991 again.

$(eSQMTotalforYear(1)) on its own gives the correct figure for the previous year :1677744.7799994


Even subtracting a constant has no effect : =$(eSQMTotalforYear(0)) -800000 returns : 871541.71999991.

I'm hoping there's something obvious I've overlooked.

Kind regards

Andrew Walker

1 Solution

Accepted Solutions
4 Replies
marcus_sommer

Could this: Well-commented variables. Be careful! be the reason?

- Marcus

effinty2112
Master
Master
Author

Thanks Marcus,

                         I had a commented out previous version of my expression after my working expression and that was throwing the spanner into the works.

Cheers

Andrew

trdandamudi
Master II
Master II

This is very interesting,,,, Can you please share a small sample so that we can take a look and see what is happening..

effinty2112
Master
Master
Author

Hi Thirumala,

                         Marcus pointed me in the right direction. My first expression's formula ended in a comment and when this was expanded the // commented out everything that followed including the second expression.

Cheers

Andrew