Using the CONCATENATE function
DAX includes several functions that are classified as text functions. These functions let you apply and manipulate strings in a variety of ways. Some of the more common functions that you will use include CONCATENATE
and LEFT
. Recipes for these functions will be provided in this section.
The CONCATENATE
function is very useful when you need to join two strings together into a single string. You can join either two columns together or you can join columns to text strings. When using a text string, the value must be enclosed in quotes. In this recipe, you will create a column to join two columns together. This will allow your users to filter the results easily by choosing a label versus a value. The CONCATENATE
function has a required syntax of CONCATENATE(<text1>,<text2>)
.
How to do it...
Open the Chapter_9_DAX solution, select the CRASH_DATA_T table, and make sure you are in the data Grid view.
Scroll to the right until you find the Add Column. Then...