Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

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?

Tags (2)
1 Solution

Accepted Solutions
chematos
Valued Contributor II

Re: Count grouped by date

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

3 Replies
chematos
Valued Contributor II

Re: Count grouped by date

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

Re: Count grouped by date

Thanks, José!

Can't spot any differences with or without TOTAL.

chematos
Valued Contributor II

Re: Count grouped by date

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

You´re welcome

Community Browser