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

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Load statements

I have a working load statement (Department), and want to add another from the same table so presumed id put it below - this hasnt worked though, what am i doing wrong?  see below:

LOAD *,

   If(Department =1, 'Blue Team',

   If(Department =2, 'CNC Team',

   If(Department =3, 'Green Team',

   If(Department =4, 'Office Team',

   If(Department =45, 'Admin Team',

   If(Department =5, 'Red Team',

   If(Department =6, 'White Team',

   If(Department =7, 'Yellow Team',

   If(Department =9, 'Aqua Team'))))))))) AS Team;

LOAD *,

   If(WorkPattern =FC01, '39',

   If(WorkPattern =FC02, '32',

   If(WorkPattern =FC03, '39',

   If(WorkPattern =FC04, '16',

   If(WorkPattern =FC05, '19',

   If(WorkPattern =FC06, '23',

   If(WorkPattern =OF01, '39',

   If(WorkPattern =OF02, '32',

   If(WorkPattern =OF03, '24'))))))))) AS Hours;

  

Employees:

LOAD EmployeeNumber,

    Department,

    WorkPattern;

SQL SELECT EmployeeNumber,

    Department,

    WorkPattern

FROM EquatorCompanyA.dbo.TimBEEmployeeDetails;

1 Solution

Accepted Solutions
hic
Former Employee
Former Employee

Your condition

     WorkPattern =FC01

should probably be quoted:

     WorkPattern ='FC01'

HIC

View solution in original post

4 Replies
hic
Former Employee
Former Employee

Your condition

     WorkPattern =FC01

should probably be quoted:

     WorkPattern ='FC01'

HIC

Anonymous
Not applicable
Author

Thanks Hic, that worked!  i dont understand why the first load didnt require quote marks then?

simondachstr
Specialist III
Specialist III

I recommend you to use ApplyMaps() instead.

simondachstr
Specialist III
Specialist III

Because it's numeric.