Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

Highlighted
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

Aggregate Expression Help

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'

2 Replies
Not applicable

Aggregate Expression Help

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'

Not applicable

Aggregate Expression Help

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.