Exploring, modeling, predicting and reporting with SAS Visual Analytics and SAS Visual Statistics

Concatenate First and Last name

Accepted Solution Solved
Reply
Occasional Contributor
Posts: 7
Accepted Solution

Concatenate First and Last name

Hi,

  Am just trying to concatenate first and last name in the following format:

 

Doe, Jane

 

Simple concatenate keeps giving me DoeJane. How do I insert the comma and space?


Accepted Solutions
Solution
‎04-07-2017 11:03 AM
Respected Advisor
Posts: 4,648

Re: Concatenate First and Last name

Can you do this in two steps?  First concatenate ', ' and then concatenate first_name to the result?

View solution in original post


All Replies
Super User
Posts: 988

Re: Concatenate First and Last name

try the catx function as below

catx(' , ', first,last);
Thanks,
Jag
Occasional Contributor
Posts: 7

Re: Concatenate First and Last name

I'm in "new calculated item" field and it keeps telling me that "catx" is an unknown function? 

Super User
Posts: 988

Re: Concatenate First and Last name

ok Sorry, this is a base sas function I mentioned. I am not familiar with BI, however somebody with BI would respond and provide the solution.
Thanks,
Jag
Occasional Contributor
Posts: 7

Re: Concatenate First and Last name

I'm in SAS VA?
Solution
‎04-07-2017 11:03 AM
Respected Advisor
Posts: 4,648

Re: Concatenate First and Last name

Can you do this in two steps?  First concatenate ', ' and then concatenate first_name to the result?

Occasional Contributor
Posts: 7

Re: Concatenate First and Last name

That totally worked! Thank you!!

Community Manager
Posts: 422

Re: Concatenate First and Last name

I'm glad you found the solution, Tihannah! If one of the replies was the exact solution to your problem, can you "Accept it as a solution"? Or if one was particularly helpful, feel free to "Like" it. This will help other community members who may run into the same issue know what worked.

Thanks!
Anna

Post a Question
Discussion Stats
  • 7 replies
  • 189 views
  • 1 like
  • 4 in conversation