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

Count grouped by date

Hi,

I'm trying to count number of "HayRolling" activities over a specific period, for instance per week.

ActivityDateTimeStampYearWeek Number
HayRolling14.09.2012 12:04:382012371
HorsePlay14.09.2012 12:00:082012371
HayRolling13.09.2012 15:35:172012372
HayRolling14.09.2012 12:16:002012371

So the HayRolling activities should be group and display 4 in this example. Currently the activities are grouped only if the timestamp is identical, as in the 3rd row. My expression:

=Count({$<Activity={"HayRolling"}>} [Year]&[Week])

How can I achieve this please?

1 Solution

Accepted Solutions
chematos
Specialist II
Specialist II

Try this:

aggr(Count({$<Activity={"HayRolling"}>} [Year]&[Week]), Year,Week)

or may be with TOTAL:

aggr(Count({$<Activity={"HayRolling"}>} Total [Year]&[Week]), Year,Week)

hope this helps

View solution in original post

3 Replies
chematos
Specialist II
Specialist II

Try this:

aggr(Count({$<Activity={"HayRolling"}>} [Year]&[Week]), Year,Week)

or may be with TOTAL:

aggr(Count({$<Activity={"HayRolling"}>} Total [Year]&[Week]), Year,Week)

hope this helps

Not applicable
Author

Thanks, José!

Can't spot any differences with or without TOTAL.

chematos
Specialist II
Specialist II

Yes, should be the first one but just in case....

You´re welcome