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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
akpofureenughwu
Creator III
Creator III

Select name character

Hello everyone,

I have a table of staff name I pulled from sql,

First NameMiddle NameLast NameCode
JohnN/ALee001
KittyBrownFrankie002
TracyMoleChuck003
GrantN/ASam004

This is the sample of the data.  N/A is there because the staff doesn't have a middlename.

I need to concatenate the First Name, Middle Name and Last Name  to give Full Name

I'm using this expression:

Last_Name&' '&"Middle_Name"& ' '&First_Name as [Full Name]

but if I use the above expression for the staff with code 001.. full name will become John N/A Lee and this is not valid

How do I edit it so I will skip Middle Name when Middle Name  = 'N/A'

Labels (1)
1 Solution

Accepted Solutions
rwunderlich
MVP
MVP

Last_Name&' '& if(Middle_Name<> 'N/A', Middle_Name & ' ', '') & First_Name as [Full Name]


-Rob

http://masterssummit.com

http://qlikviewcookbook.com

View solution in original post

4 Replies
rwunderlich
MVP
MVP

Last_Name&' '& if(Middle_Name<> 'N/A', Middle_Name & ' ', '') & First_Name as [Full Name]


-Rob

http://masterssummit.com

http://qlikviewcookbook.com

sunny_talwar
MVP
MVP

May be try this

Last_Name & If(Middle_Name <> 'N/A', ' ' & Middle_Name) & ' ' & First_Name as [Full Name]

MarcoWedel
MVP
MVP

Hi,

another solution could be:

QlikCommunity_Thread_269907_Pic1.JPG

Replace([First Name]&' '&[Middle Name]&' '&[Last Name],' N/A','') as [Full Name]

hope this helps

regards

Marco

akpofureenughwu
Creator III
Creator III
Author

Thank you Marco. This is great