Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Announcements
Qlik® Product Spotlight: Discover what’s possible. Get more from our products.
See for yourself. Register today.
wayneantinore-a
Contributor

Calculating count per week

Hi, I'm having trouble calculating a count per week.  See image below.  I want the week count to be the total for the week regardless of the "When Verified" dimension.  So for every row with 7/2/2017 the value would be 2923.  I've tried numerous expressions using set analysis etc. but cannot get this to work.  Thanks in advance for any assistance. 

The latest attempt was the following:  Aggr(count([Order#]),Weekstart(Collected))

CountPerWeek.JPG

1 Solution

Accepted Solutions

Re: Calculating count per week

Unfortunately, you cannot use a calculated dimension in Aggr() function. May be create a new field in the script like this

WeekStart(Collected) as WeekStart_Collected

and then try this

Aggr(Count([Order#]), WeekStart_Collected)

or this

Aggr(NODISTINCT Count([Order#]), WeekStart_Collected)

2 Replies

Re: Calculating count per week

Unfortunately, you cannot use a calculated dimension in Aggr() function. May be create a new field in the script like this

WeekStart(Collected) as WeekStart_Collected

and then try this

Aggr(Count([Order#]), WeekStart_Collected)

or this

Aggr(NODISTINCT Count([Order#]), WeekStart_Collected)

wayneantinore-a
Contributor

Re: Calculating count per week

Thanks Sunny!  That was it.  I changed it to load it specifically and works correctly.  I did need the NODistinct as well.

Thanks again.