Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Save $650 on Qlik Connect, Dec 1 - 7, our lowest price of the year. Register with code CYBERWEEK: Register
cancel
Showing results for 
Search instead for 
Did you mean: 
surajap123
Creator III
Creator III

count for each week

Hi All,

I want to count the IDs which fall in a week range.

In this example the week is 19/05/2014 - 23/05/2014. So here the answer is 13.

FromDateToDate          ID
19/05/201425/07/201412
14/04/201420/06/201424
28/04/201427/06/201419
28/04/201427/06/201412
28/04/201401/08/201423
19/05/201427/06/20149
19/05/201427/06/20149
31/03/201406/06/20142
31/03/201423/05/201425
28/04/201413/06/201416
28/04/201423/05/201427
12/05/201413/06/201416
12/05/201423/05/2014

15

How can i achieve this in qlikview.

1 Solution

Accepted Solutions
Clever_Anjos
Employee
Employee

Please check if fits your needs

View solution in original post

9 Replies
Not applicable

How is it 13?? Could u please explain it?

surajap123
Creator III
Creator III
Author

My requirement is to count the number of people occupying a Class Room in a particular week.

So here, people can start the course any time and end anytime, but i want to count number of students occupied that class room in a week.

So, in this example i got 13 because there are 13 people(IDs) are falling in the week 19/05/2014- 23/05/2014(highlited in bold)

Not applicable

Sorry, but l still don't understand how you got 13.

Thanks

Not applicable

So you don't care about how many unique ID's there are? Just how many total?

Not applicable

Also, how are you trying to display this?  A pivot table? Straight table text box?  Could you share a little more about the scenario, please?

Clever_Anjos
Employee
Employee

Please check if fits your needs

surajap123
Creator III
Creator III
Author

Hi Clever,

Thanks a lot for the solution. This absolutely works.

Infact, I want to analyse the count based on 2 more dimensions. I tried to add those dimensions to pivot table and tried your script and expression, but it is not working. May be I need to do some changes to the expression or script.

Also, how can I link the week to master calendar, so that user can click on a particular week and can see the different Room counts for each dimension in pivot table?

Thanks a lot

Regards,

Suraj

Clever_Anjos
Employee
Employee

That solution works with a disconnected week field.

Could you post your qvw?

surajap123
Creator III
Creator III
Author

Hi Clever,

Thanks you so much !!

Yes,it is working with all my dimensions in the pivot table. Earlier i created wrong.

Just wondering how can i link this island table to the calender, so that when users click on the month and week number, they can able to see the count of students in each room for selection.

Also, what should be the number in Autogenerage function parameter for my requirement.