Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
dmac1971
Creator III
Creator III

Expression Problem

OK hitting a brick wall on this one.  I have a piece of work that lets us estimate useage levels against population.  3 sliders are used to input where we expect figures to be and everything is working fine bar on a google map that I have.

Calc is as follows :

(sum({<Year = {'2016'}>} Units))

/

Round  (((sum({$<Type = {'Red'}>}Part_Qty)*$(vRedChanges))*2)*$(vPoint_In_Year))

+          (((sum({$<Type = {'Blue'}>Part_Qty)*$(vBlueChanges))*2)*$(vPoint_In_Year))

+          (((sum({$<Type = {'Green'}>}Part_Qty)*$(vGreenChanges))*2)*$(vPoint_In_Year))

So this is # units sold / expected # units, to get a % result of how sales are doing.

If I check each part of the calc everything is fine, ie the sum of units is correct, and the sum of Part Qty is fine however when entered as above I get the wrong answer, so I'm missing something.

Same calc is used in numerous locations in my report but in charts etc and works fine, its only failing on the google map, and is only used here as pop up when you mouse over an account etc.

1 Solution

Accepted Solutions
Anonymous
Not applicable

Hi Dermot,

Try with a rangesum:

(sum({<Year = {'2016'}>} Units))

/

Round  (

     RangeSum(

     sum({$<Type = {'Red'}>}Part_Qty)*$(vRedChanges)*2*$(vPoint_In_Year),

     sum({$<Type = {'Blue'}>Part_Qty)*$(vBlueChanges)*2*$(vPoint_In_Year),

     sum({$<Type = {'Green'}>}Part_Qty)*$(vGreenChanges)*2*$(vPoint_In_Year)

     )

)

Regards!!

View solution in original post

2 Replies
Anonymous
Not applicable

Hi Dermot,

Try with a rangesum:

(sum({<Year = {'2016'}>} Units))

/

Round  (

     RangeSum(

     sum({$<Type = {'Red'}>}Part_Qty)*$(vRedChanges)*2*$(vPoint_In_Year),

     sum({$<Type = {'Blue'}>Part_Qty)*$(vBlueChanges)*2*$(vPoint_In_Year),

     sum({$<Type = {'Green'}>}Part_Qty)*$(vGreenChanges)*2*$(vPoint_In_Year)

     )

)

Regards!!

dmac1971
Creator III
Creator III
Author

Manuel that was the answer, perfect!!! Many thanks will read up on this function.