Forum Discussion

BenMoses's avatar
BenMoses
New Member
2 years ago
Solved

Creating a String Array in Power BI

Hi, 

I got 3 differenet columns and I want to create a String Array for them and I want them into a table

 

Ex:

CarsModelColor
HondaCivicWhite
Mazda CX9Black
ToyotaCamryRed

 

I'm not sure about the String function that needed to be used! 

 

Thank you!

  • Hi BenMoses ,

     

    You can use COMBINEVALUES to concatenate those columns

    You can also use & sign but this will result to a more verbose formula

     

     

     

4 Replies

  • Hi BenMoses ,

     

    You can use COMBINEVALUES to concatenate those columns

    You can also use & sign but this will result to a more verbose formula

     

     

     

    • BenMoses's avatar
      BenMoses
      New Member

      formatted String ["Car", "Model", "Color"]

      Thank you

  • Create a custom column in the Power Query and add this M code.
    = "[" & Text.From([Cars]) & ", " & Text.From([Model]) & ", " & Text.From([Color]) & "]".
    This should help you achieve the output you are looking for.

    Let me know if this works.