3 Replies Latest reply: Oct 24, 2017 3:28 AM by Onno van Knotsenburg RSS

    Help with script to join tables

    Maria Mickols

      Hi I have a question!

       

      These are (a few of) my dimensions in my QlikSense app:

       

      Fact table:

      DateKey (when work was performed)

      UtilisationKey (date when work was performed + employeenumber)

      EmployeeKey

      OrganizationalUnit (e.g. Org_Unit1)

      HoursRegistered (hours someone worked on a certain date)

      UPFA (Unplanned fee adjustments)

      ...


      Utilisation table:

      UtilisationKey

      AvailableHours

      EmployeeNumber_Util

      ...


      Employee table:

      EmployeeKey

      OrganizationalUnit_Emp (e.g. Unit 1)

      OrganizationalTeam (e.g. Team 1)

      ...


      Date table:

      DateKey

      ...


      I need to count the utilisation for a person, which is HoursRegistered / AvailableHours and then I want to visualise that persons belonging to a Organizational unit and team.


      But the problem is that the people that are in the fact table are the only ones who actually have registered hours, and not the ones who were only available. So I want to add the persons who have null() HoursRegistered but have HoursAvailable (in the Utilisation table) to the fact table, put the null() to 0, and then also connect an organisational unit and team to each of them. But the information about those persons is only in the Employee Table and in another format than it is in the fact table (e.g. Org_Unit1 vs. Unit 1)


      Any suggestions and script examples how I can solve this?


      Big thanks!


      Maria