Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
madushanfernand
Contributor III
Contributor III

convert date range to a single year, month, week filters

Hi All,

I need some help on how to get the active employees over the selected year or month or a week as following dash board depicts. My data set is as follows


ex :

EXCEL.JPG

What my requirements are,

1. which year, month and week do i use as the list box parameter in the dash board- (extract it from emp_startdate or emp_enddate or create a master calendar)

2. In the bar chart shown as below, which month do i use as the x-axis dimension

3. how to get the active employees over the selected year or month or week as shown in the dash board below.

The out put in the dash board should be like


QUESTION.JPG

The logic to get active employees some thing like


if the year and month selected are 2017 and APR then,

count the emp_ids where emp_startdate<=30/04/2017 and 30/04/2017 <emp_enddate


I am kinda confused on how to start with and would be great full if someone can help me on this to sort out.

Thanks a lot for all the help in advance.

5 Replies
sunny_talwar

Check here for "Looping over the same record" in the attached blog post

Loops in the Script

madushanfernand
Contributor III
Contributor III
Author

Thanks for your response sunny. but this link direct me to the same page where i post my issue.

can you send me the link for "Looping over the same record".

sunny_talwar

My bad, try this now

Loops in the Script

MarcoWedel

Hi,

maybe helpful:

Creating Reference Dates for Intervals

regards

Marco

madushanfernand
Contributor III
Contributor III
Author

hi Sunny & Marco

This helps a lot. Thank you very much for saving my time.