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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Need weekly count of Employees from employee table for each costcenter

Hi

I have a emp table with fields EID ValidFrom Validto Costcenter, I need to see the weekly view of the employees for each costcenter.

I think I have to generate the master calendar which will have weekstart and weekend fields that can check if validfrom < weekstart and validto>weekend.

The challenge is how I join the the emp table with mastercalendar based on what field?

I tried the intervalmatch like this..but nothing happened.

Emp:

Load eid validfrom validto costcenter from Emp.qvd(qvd);

Weekcategory:

Load mastercalendate,weekstart,weekend,week,day,yearmonth,year,month... from Mastercalendar.qvd(qvd);

intervalmatch (Weekstart,weekend) load validfrom,validto,eid resident emp;

Thanks

2 Replies
Pablo_Robles
Partner - Contributor III
Partner - Contributor III

Hi Jackson,

I dont' understand very well the problem but

How do you want to visualize the results? If you want to visualize in a graph object you can create a calculated dimension with the week (or in the script) and count the number of employees in the fact table.

Best regards,

Pablo Robles

Not applicable
Author

I want to capture the weekly view of employee per cost center in the script based on the validfrom and valid to date of the employee