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: 
Not applicable

Aggr in set analysis

count(({$<Date={">=$(=(MonthStart(Max(Date))))<=$((=(Monthend(Max(Date))))"}>}distinct  <docname,username,date> sessionid)

i was trying this expressiopn to get the count of the days per user, document and irrespective of no of sessions performed on any given day. Seems like the expression is not working if we can use aggr in set analysis is that some that wrong with my sytax?

3 Replies
Not applicable
Author

You frogot the total:

count({$<Date={">=$(=MonthStart(Max(Date)))<=$((=Monthend(Max(Date)))"}>} distinct total <docname,username,date> sessionid)


But if you dont have docname,username,date as a demensions in you chart. Then you need to use aggr:

sum(aggr(count({$<Date={">=$(=MonthStart(Max(Date)))<=$((=Monthend(Max(Date)))"}>} distinct sessionid), docname, username, date))

Not applicable
Author

Hi Alex, in the expressions that you have provided do i need to follow the sequence or doesn't matter when i write the aggr function between docname, username, date and sessionid?

Not applicable
Author

I dont fully understand your question, but

docname, username, date may be in any order

the first argubent is expression, the others is demensions.