I am mew to DAX. How can I concatenate three different columns say First_Name, Middle_Name and Last_Name to a single column with a space in between using CONCATENATE function in DAX. At present I could concatenate only two columns.
=CONCATENATE(FIRST_NAME],CONCATENATE(" ",[LAST_NAME]))
If any other function is there please do let me know that also. My aim is to concatenate 1st Name, 2nd Name and 3rd Name into a single column in SSAS Tabular Model
Please help me. Thanks in Advance
For anyone coming back to this, particularly if you have more than two variables to concatenate, consider using COMBINEVALUES():
=COMBINEVALUES(<delimiter>, <expression>, <expression>[, <expression>]…)
For the posted question, this would look like:
=COMBINEVALUES(" ", [FIRST NAME], [LAST NAME])
And can be expanded to include additional values after [LAST NAME]
.
You can use nested CONCATENATE functions with the &
to append your spaces. Following your example:
=CONCATENATE([FIRST NAME]&" ", CONCATENATE([MIDDLE NAME]&" ", [LAST NAME]))
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With