Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
dudumoscona
Contributor
Contributor

Create 2 values based on a list of values

Hi all,

i have a field that contains "leaving data" - if the employee left or fired and the reason.

left starts with V and Fired start with I .

Example V - Employee found a better place

                    I - Employee didnt do his job

i want to create a list box that will show only 2 values of "Fired" and "left" out of all the 100 reasons and also to show the Fired/left in the table i've built - is it possible?

 

 

 

 

15 Replies
tresesco
MVP
MVP

Try expression like:

If(Left(trim('leaving data'),1)='V', 'Left', If(Left(trim('leaving data'),1)='I', 'Fired'))

dudumoscona
Contributor
Contributor
Author

Hi ,

Script wise it went fine , but i could not see the new field when i created a list box i added the syntex that i've wrote

tresesco
MVP
MVP

Are you saying that the field is not created or no value is there in the field?
dudumoscona
Contributor
Contributor
Author

there is no field at all, i cant choose it (not there) on the fields list

tresesco
MVP
MVP

Did you run reload after modifying the script?

dudumoscona
Contributor
Contributor
Author

yes 🙂

tresesco
MVP
MVP

Could you share screen shot of expression with just =<new field name>?
dudumoscona
Contributor
Contributor
Author

yes sure 1.jpg2.jpg

tresesco
MVP
MVP

Add one more field and see if that appears post load.
...
1 as test2,
...