Qlik Community

Ask a Question

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

Announcements
Welcome to our newly redesigned Qlik Community! Read our blog to learn about all the new updates: READ BLOG and REPORTED ISSUES
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Aggregate Expression Help

Hey All. I'm a beginner user trying to get a grip on expressions. I'm pretty sure what I need to accomplish is pretty simple but I'm definitely struggling. Any guides on expressions would also be appreciated.

I need a label to aggregate the max number of users at any time, summed across all values. I.e. In the example below, if Jun 5 was selected it would return 11. If June 6 was selected it would return 10. If nothing was selected it return 11. If Serv1 was selected, it would return 5. If Serv1 and June 6 were selected it would return 3, etc.



DateTimeServerMax Users
Jun 5Serv15
Jun 5Serv26
Jun 6Serv13
Jun 6Serv27


Thanks in advance for any guidance that can be provided.

1 Solution

Accepted Solutions
Not applicable

Ah. Should've kept at it before posting.

Got the expression:

=sum(aggr(max([Max Users]),Server))

A useful page in the F1 help menu was 'Expression syntax for calculated formulas'

View solution in original post

2 Replies
Not applicable

Ah. Should've kept at it before posting.

Got the expression:

=sum(aggr(max([Max Users]),Server))

A useful page in the F1 help menu was 'Expression syntax for calculated formulas'

View solution in original post

Not applicable

Something like this:

='Max User = ' &
if(len(GetFieldSelections('DateTime')) and len(GetFieldSelections('Server')),
max(aggr(sum([Max Users]), DateTime, Server)),
if (len(GetFieldSelections('Server')) = 0, max(aggr(sum([Max Users]), DateTime)),
max(aggr(sum([Max Users]), Server))))


See attachment.