Discussion Board for collaboration on QlikView Scripting.
I have a table with a list of employees in it and another table with a list of dates in it that are auto generated (master calendar table).
What I now need to do is to create a record for each employee with every date in the calendar so as an example:
What I need to end up with is
Is anyone clever enough to help me out with how I might achieve this?
Many thanks in advance,
Go to Solution.
With a simple join? (Am I missing something here?)
Load * Inline [Employee BobFredTimPete];CalendarTable:JoinLoad * Inline [Date01-01-0102-01-0103-01-0104-01-01];
I was unaware that you could join two unrelated tables to do this but had just found the answer on another post.
This is the code I actually used to do it which has worked just great.
Distinct Name as EmployeeName, 0 as EmployeeHours
LOAD date(Date) AS EmployeeDate
Appreciate your super quick reply!
Just join the tables, it automatically creates Cartesian table.
LOAD DISTINCT EMPLOYENAME FROM EMPLOYEE_TABLE;
LOAD DISTINCT DATE FROM CAL_TABLE;