Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
robin_heijt
Creator
Creator

If value is present, ignore the rest

Hi,

 IF("Movement Type"='Promotion Band Up','Implemented' ,
 IF("Movement Type"='Promotion Within Band','Not Implemented' ,
 IF("Movement Type"='Lateral Move','Not Implemented' ,
 IF(isnull("Movement Type"), 'Not Implemented' ,
 IF("Movement Type"='Termination Voluntary','Not Implemented',
 IF("Movement Type"='Termination Involuntary', 'Not Implemented')))))) as "4A Implementation", 

With this code I define an implementation of something.

As my source files I have: Employee report and Movement Report.

Because I load my movement script concatenated, every person that has a movement has 1 line from the movement report, and 1 line from the employee report.

The line from the employee report will be blank where the movement report will show a movement.

I now want to implement this implementation script, that it looks if a value is already present from the movement script, and then will show implemented in both the employee report line and movement report line.

As you can see in the picture, the first line for example, is the same person. She already has 1 implemented line, her other line should then also say implemented.

Untitled.png

 

 

6 Replies
bramkn
Partner - Specialist
Partner - Specialist

Try the match function, this might be a better way to do this together with the pick function.

robin_heijt
Creator
Creator
Author

Thanks,

Could you please guide me in the right direction as to what you mean?
Where would I use match and pick?
I have never used the syntax Pick before 🙂
bramkn
Partner - Specialist
Partner - Specialist

the match function returns a number for the string that is matched to the field value. so if you have a pick arround that you can use pick to determine what string to give back for that number. Its basically the inverse of match. giving a number and getting a string in return.
robin_heijt
Creator
Creator
Author

Could you possibly type that out for me? Because I understand what you are saying. But I am totally lost in how to adapt my script to use that. 🙂
bramkn
Partner - Specialist
Partner - Specialist

pick(match("Movement Type",'Promotion Band Up','Promotion Within Band'etc....),'Implemented','notimplemented')
Not sure if pick startes with 0 or 1 so ull need to play arround with that.
robin_heijt
Creator
Creator
Author

Alright, thanks. I understand.

But it unfortunately does not solve my issue.
What I need it to do now, is see if there is a previous implemented value assigned to an ID, and then fill in the blanks with implemented too.

So as example:

Untitled.png

The red lines should also say implemented.

But in the case of Ekaterin, it should say not implemented, as she does not have a movement at all.