4 Replies Latest reply: Mar 2, 2016 5:29 AM by L Nibbelink RSS

    Add months to salary

    L Nibbelink

      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.