# Using Concatenate in DAX in PowerPivot as a Measure



## montyfern (May 6, 2019)

Good Day,

Thank you in advance for answering this question.  I can't combine two fields with an "x" value.  For example, I'm combining lumber height & width so I write a calculated column =CONCATENATE(Data[Height],[Width]) and it shows 812 instead of 8x12. So then I read several websites & tried =CONCATENATEX(Data,[Height] & "x" & [Width]) and unfortunately it combines all of them for values fields, making very long strings "6x126X128X126X146X14" etc.  In "regular Excel," I'd use =TEXT(B2,"00")&"x"&TEXT(C2,"00") but I can't figure out how to transform this into a cool DAX calculation.  I'm only using measures in Power Pivot, or calculated columns, NOT Power BI. My goal is to write KPI's in Power Pivot.

Thanks so much!


----------



## peter789 (May 7, 2019)

CONCATENATE only works with two text strings.  You need to nest a second CONCATENATE function in the expression =CONCATENATE(Data[Height],CONCATENATE(" x ",Data[Width])).  Or just use the & operator =Data[Height] &" x" & Data[Width]). Don't use CONCATENATEX for this example.


----------



## montyfern (May 7, 2019)

Thanks very much!  I knew it was fairly simple, & that it only accepted two text strings, but just couldn't get there. Thx. again!


----------

