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

Add total of straight table to another value

Hi,

I have a straight table

Country     Count     Amount    month

ABC          52          104               01

ccc              21          21               01

eee          60               120               01

ABC           70           140              02

ccc             5                  5            02

here i calculate Amount as below

if count < 50 , amount = count else amount = count * 2

So i get the total of this table = 390

now i need to add this 390 to another variable say y,

please tell me how to do that

Thanks

15 Replies
Not applicable

You should consider using IntervalMatch with an excel or text file to store the intervals.

kamalqlik
Partner - Specialist
Partner - Specialist

Hi Anuradha,

Please Find attached application .

Regards,

Kamal Naithani

anuradhaa
Partner - Creator II
Partner - Creator II
Author

Thank You

Here i want to add 1000 to

Total " =sum(Amount)+[Calculated Amount] " value    4549.16  in  text box

kamalqlik
Partner - Specialist
Partner - Specialist

Hi Anuradha,

Please find updated QVW.

You can use in both ways,either by making variable or going directly

Regards

Kamal

anuradhaa
Partner - Creator II
Partner - Creator II
Author

Thanks Kamal

Anonymous
Not applicable

Hi,

If you are looking total at County level, you may not have to use "Month" column in aggregation. Could you just remove and see if you are getting result. Overall logic looks okay.

=SUM(Aggr(Sum(if(COUNTRY='B',0,(if(Date#(AEI_MonthYear,'MMM-YY') <= date#('Jun-14','MMM-YY'),

((if((Sum(COUNT)<=130),(Sum(COUNT)*.15),if((Sum(COUNT)>130 and  Sum(COUNT)<=220),((Sum(COUNT)-130)*.033)+130,((Sum(COUNT)-220)*.041)+204)))*19.6) ,

((if((Sum(COUNT)<=130),(Sum(COUNT)*.101),if((Sum(COUNT)>130 and  Sum(COUNT)<=220),((Sum(COUNT)-130)*.053)+131,((Sum(COUNT)-220)*.0415)+206.2)))*19.6))))),Month,COUNTRY))