Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I created a dimension in Data Manager using calculated field. I used the IF and MATCH function that looks something like below:
If(Match([Employee ID],'value1','value2','value3'),'Dept1',If(Match([Employee ID],'value1','value2'),'Dept2',If(Match([Employee ID],'value1','value2'),'Dept3',If(Match([Employee ID],'value1','value2'),'Dept3',If([Employee ID]='value','Dept4',If([Employee ID]='value','Dept5',If([Employee ID]='value','Dept6','Dept7')))))))
The formula seems to be working as Departments 1 to 7 are listed under the preview section of the calculated field. However, when I load the data and go to Analyze Sheet and create a visualization for the Department, only Dept4 to Dept7 are listed.
I am new to Qlik and have been using the Data Manager in manipulating my data or adding dimension into the table. How do I make the Match function work or what do I need to tweak in the formula so Dept1, Dept2, and Dept3 shows in Analyze sheet (without adding this as a script in Data Load Editor)?
@johncpa So, what employee id values should belong in each department? Looking at your statement, value gets assigned to DEPT4 and DEPT7 seems like a catchall.
In Analyze sheet can you include Employment Id to see how the assignment is working? That should help you sort the issue.
Your IF statement definitely has a problem but without knowing you want to assign Employment IDs to departments, I am unable to provide a solution.