Monday, January 21, 2013

[Microsoft BI] Concatenate two string fields using expression

 
Concatenate two string fields using expression
 
To concatenate two or more fields using expression in SSRS. Please follow my SSRS tutorial.

Below we can see a table and we want to concatenate First Name with Surname to get Full Name.





First I Add new column to the Left.




Once new column exist we can type the header (Full Name), right click the cell where we want to perform concatenation and then go to Expression.



At the beginning of expression I will put First Name field and I will concatenate it with empty space using & " " the trick is to use & and if we use hard coded string we need to enlose it using double quotes " ". Next I will put & to concatinate my empty space with surname field.

See below final expression.

NOTE: If you field is not string data type (for instance integer) you might have to use function to convert it to string.




That is table after adding new column in Design view.




And the final picture shows the end result






No comments:

Post a Comment