Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Make your voice heard! Participate in the 2020 Wisdom of Crowds® Survey. BEGIN SURVEY
mihai_iov
Contributor II

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?

Tags (2)
1 Solution

Accepted Solutions
Highlighted
luismadriz
Valued Contributor

Re: Aggr or Set Expression?

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
Highlighted
MVP
MVP

Re: Aggr or Set Expression?

May be like:

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

Highlighted
luismadriz
Valued Contributor

Re: Aggr or Set Expression?

Hi, I think it should be like this:

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

View solution in original post

Highlighted
mihai_iov
Contributor II

Re: Aggr or Set Expression?

That's about it, thanks!