Skip to main content
Announcements
Do More with Qlik - Qlik Cloud Analytics Recap and Getting Started, June 19: REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Calculating the difference.

hi.

I got two seperate text boxes and i basically want to calculate the difference between the two in one text box,  how could i go about doing this?

=num(sum({$<Year = {2010}>}Sales),'R#,##0'),      (text box 1)

=num(sum({$<Year = {2011}>}Sales),'R#,##0')       (text box 2)

Thanks.

3 Replies
Not applicable
Author

Try this:

num(sum({$<Year = {2011}>}Sales)-sum({$<Year = {2010}>}Sales),'R#,##0')

Not applicable
Author

Thanks it work.  One more thing,  uhm if i wanted the answer in a % form, how would i go on about that?

Not applicable
Author

For example if we want the sales of 2011 related to 2010:

num(sum({$<Year = {2011}>}Sales)/sum({$<Year = {2010}>}Sales)-1,'0,00%')