Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Aggr or Set Expression?

Computer_IDDate_UsedTime_used(hours)User_ID
110/10/20172rEyp
110/10/20172J83x
110/10/20176DnkF
210/10/201723PKS
211/10/20174MDLf
112/10/20174gqMB

Assuming I have the table from above, I need the sum of the Time_used for each Computer_ID, by taking the maximum possible amount per day.
In the above-mentioned case, the output should be something like:

Computer_IDSum_Time_used
110(6+4)
26

The question is: Should I use the aggr function or make a set expression in a sum()? Also, can you give me an example of how should I use the said function in the given example?

1 Solution

Accepted Solutions
luismadriz
Specialist
Specialist

Hi, I think it should be like this:

=Sum(Aggr(Max([Time_used(hours)]), Computer_ID,Date_Used))

View solution in original post

3 Replies
tresesco
MVP
MVP

May be like:

=Sum(Aggr(Max(hours), Date))

luismadriz
Specialist
Specialist

Hi, I think it should be like this:

=Sum(Aggr(Max([Time_used(hours)]), Computer_ID,Date_Used))

Anonymous
Not applicable
Author

That's about it, thanks!