Using Concatenate in DAX in PowerPivot as a Measure

montyfern

New Member
Joined
Oct 12, 2017
Messages
35
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!
 

Some videos you may like

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.

peter789

Board Regular
Joined
Nov 20, 2016
Messages
114
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

New Member
Joined
Oct 12, 2017
Messages
35
Thanks very much! I knew it was fairly simple, & that it only accepted two text strings, but just couldn't get there. Thx. again!
 

Watch MrExcel Video

Forum statistics

Threads
1,099,380
Messages
5,468,271
Members
406,578
Latest member
Julez_86

This Week's Hot Topics

Top