Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
AnassEss
Helper I
Helper I

Create a Simple Column with strings

Hi Once again,

 

I only want to create a simple Column with a string expression in every row NOT BASED ON ANYTHING just strings in a new column I tried with this:

Familia =
UNION (
    ROW ( "Familia", "hola" ),
    ROW ( "Familia", "adios" ),
    ROW ( "Familia", "hello" ),
    ROW ( "Familia", "bye" ),
    ROW ( "Familia", "Bonjour" ),
    ROW ( "Familia", "Ademain" )
) but I still get errors whenever I try a new approaching. We just want a column and fill the rows of the column as follows: row1: hola, row2: adios, row3: hello... looks simple and I still didnt find a way to do so.
 
Thanks in advance and kind regards
1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @AnassEss ,

Thanks @Sahir_Maharaj  for the dax, it really helped solve the problem. The reason you were getting the error was because you had to add a New Table instead of adding a New column:

vyifanwmsft_0-1709803682249.png

 

FamiliaTable = 
DATATABLE(
    "Familia", STRING, 
    {
        {"hola"},
        {"adios"},
        {"hello"}
    }
)

 

Final output:

vyifanwmsft_3-1709804932187.png

 

If you want to add a column to the back of the table, consider adding a Custom Column in Power Query:

vyifanwmsft_2-1709804894499.png

 

= Table.AddColumn(#"Changed Type", "Custom", each Table.AddColumn(#"Changed Type", "Custom", each if [Code] = 1 then "hola" else if [Code] = 2 then "adios" else if [Code] = 3 then "hello" else null, type text))

 

Final output:

vyifanwmsft_0-1709805166176.png

 

How to Get Your Question Answered Quickly - Microsoft Fabric Community

If it does not help, please provide more details with your desired out put and pbix file without privacy information.

 

Best Regards,

Ada Wang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Hi @AnassEss ,

Thanks @Sahir_Maharaj  for the dax, it really helped solve the problem. The reason you were getting the error was because you had to add a New Table instead of adding a New column:

vyifanwmsft_0-1709803682249.png

 

FamiliaTable = 
DATATABLE(
    "Familia", STRING, 
    {
        {"hola"},
        {"adios"},
        {"hello"}
    }
)

 

Final output:

vyifanwmsft_3-1709804932187.png

 

If you want to add a column to the back of the table, consider adding a Custom Column in Power Query:

vyifanwmsft_2-1709804894499.png

 

= Table.AddColumn(#"Changed Type", "Custom", each Table.AddColumn(#"Changed Type", "Custom", each if [Code] = 1 then "hola" else if [Code] = 2 then "adios" else if [Code] = 3 then "hello" else null, type text))

 

Final output:

vyifanwmsft_0-1709805166176.png

 

How to Get Your Question Answered Quickly - Microsoft Fabric Community

If it does not help, please provide more details with your desired out put and pbix file without privacy information.

 

Best Regards,

Ada Wang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Sahir_Maharaj
Super User
Super User

Hello @AnassEss,

 

Can you please try this:

FamiliaTable = 
DATATABLE(
    "Familia", STRING, 
    {
        {"hola"},
        {"adios"},
        {"hello"},
        {"bye"},
        {"Bonjour"},
        {"Ademain"}
    }
)

Did I answer your question? Mark my post as a solution, this will help others!

If my response(s) assisted you in any way, don't forget to drop me a "Kudos" 🙂

Kind Regards,
Sahir Maharaj
Data Scientist | Data Engineer | Data Analyst | AI Engineer
P.S. Want me to build your Power BI solution? (Yes, its FREE!)
➤ Lets connect on LinkedIn: Join my network of 15K+ professionals
➤ Join my free newsletter: Data Driven: From 0 to 100
➤ Website: https://sahirmaharaj.com
➤ About: https://sahirmaharaj.com/about.html
➤ Email: sahir@sahirmaharaj.com
➤ Want me to build your Power BI solution? Lets chat about how I can assist!
➤ Join my Medium community of 30K readers! Sharing my knowledge about data science and artificial intelligence
➤ Explore my latest project (350K+ views): Wordlit.net
➤ 100+ FREE Power BI Themes: Download Now
LinkedIn Top Voice in Artificial Intelligence, Data Science and Machine Learning

Hello,

 

Thanks for the effort but I get: A multi-value table was provided where a single value was expected  as if the sintax was wrong.

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.