Using Concatenate in DAX in PowerPivot as a Measure

montyfern

Board Regular
Joined
Oct 12, 2017
Messages
65
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!
 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
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.
 
Upvote 0
Thanks very much! I knew it was fairly simple, & that it only accepted two text strings, but just couldn't get there. Thx. again!
 
Upvote 0

Forum statistics

Threads
1,214,525
Messages
6,120,051
Members
448,940
Latest member
mdusw

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top