Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I'm new to Qlik and trying to acomplish the following.
I have a table with employees and year salary's. I also have a master calendar and some other tables.
This is my master calendar
minmax:
LOAD
date(max(OrderDate)) as MaxDate
RESIDENT Facttable;
LET vMinDate = Num(makedate($(vDateLimit)));
LET vMaxDate = Num(peek('MaxDate'));
DROP TABLE minmax;
TempCalendar:
LOAD
date($(vMinDate) + rowno() -1) as TempDate
AutoGenerate
$(vMaxDate) - $(vMinDate) + 1;
MasterCalendar:
Load
TempDate As OrderDate,
'Q-' & Ceil(Month(TempDate)/3) as Quarter,
Week(TempDate) As Week,
Year(TempDate) As Year,
Month(TempDate) As Month
resident TempCalendar;
This is my Employees table
Employees:
LOAD EmployeeID,
FullName,
[Year Salary]
RESIDENT EmployeesTmp;
I want to make a new calendar, with the employeeID's, Salary's per month and with them linking to the OrderDate of the mastercalendar. How do i accomplish this?
Thanks in advance.
Where are the salaries per month for the employees?
They do not exist yet. I only have a year salary in my source.
Then you have to decide how to turn the year salary into month salaries. And which year are we talking about. I didn't see a year field either. Or does the year salary apply to all years for the entire time span in the master calendar?
Hi There,
I've found a solution:)
It indeed had to go the full span of the master calendar. So first i created a temp table where with iterno() i've generated the 12 months, and after that in the defenitive table the years (also with iterno())