Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
jduluc12
Creator
Creator

Using aggr

Hi,

My sample table looks like

ID-1 ID-2 NAME AMOUNT  
1 10 A 10  
1 11 B 20  
1 12 C 30  
6 21 A 25  
6 22 D 30  
30 31 E 40  
30 32 C 50  

 

The expression I am looking for is

if the total amount per ID-1 exceeds or equals a certain number, say 60, then show all NAME associated with that ID along with the amount.

so the total amount per ID is

ID-1 AMOUNT
1 10+20+30 = 60
6 30+25 = 55
30 40+50 = 90

 

So, the output should be

ID-2 NAME AMOUNT
10 A 10
11 B 20
12 C 30
31 E 40
32 C 50

 

Thanks,

Jean

Labels (1)
1 Solution

Accepted Solutions
hic
Former Employee
Former Employee

You probably don't need Aggr() for this. Try using "ID-2" and Name as dimensions in a chart (table or bar chart) and
Sum({<"ID-1"={"=Sum(Amount)>=60"}>} Amount)
as Measure.

View solution in original post

2 Replies
hic
Former Employee
Former Employee

You probably don't need Aggr() for this. Try using "ID-2" and Name as dimensions in a chart (table or bar chart) and
Sum({<"ID-1"={"=Sum(Amount)>=60"}>} Amount)
as Measure.

jduluc12
Creator
Creator
Author

Thanks, Hic...it worked