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

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now

Reply
New2PowerBI
Helper III
Helper III

Combining Columns

I searched through this community and found the following formula for a new column:

 

Text.From([Column) & Text.From([Column2]) & Text.From([Column3])

 

I used it and it works great!  However, if the column has either null or number values, it errors out.  How can I overcome this?

5 REPLIES 5
v-ljerr-msft
Microsoft Employee
Microsoft Employee

Hi @New2PowerBI,

 

According your description above, I have tested it with the latest version(2.48.4792.721 64-bit (July 2017)) of Power BI Desktop on my environment. The formula works all fine without any issue, even when the column has either null or number values.

 

r3.PNG

 

What's the error? Could you post here? It's better that you could also share a sample pbix file which can reproduce the issue. So that we can better assist on it. You can upload it to OneDrive or Dropbox and post the link here. Do mask sensitive data before uploading. Smiley Happy

 

Regards

Here is what error I get:

 CombiningColumns_Error.jpg

 

 Here is the updated one:

= Table.AddColumn(#"Changed Type6", "PMSearchData", each [PMNUM]&" , "&[DESCRIPTION]&"   ,   "&[JPNUM]&"   ,   "&[USEFREQUENCY]&"   ,   "&[FEQUNIT]&"   ,   "&[ROUTE])

 

I have no issues if I do just 3 items.  In this case, I added three more fields and I received the error.  Not sure if it has to do with numbers and/or null values now, maybe it's more tied to the number of columns I'm trying to pull in versus what is in the column?

 

According to your initial information, I would expect that your code would look like:

 

= Table.AddColumn(#"Changed Type6", "PMSearchData", each Text.From([PMNUM])&" , "&Text.From([DESCRIPTION])&"   ,   "&Text.From([JPNUM])&"   ,   "&Text.From([USEFREQUENCY])&"   ,   "&Text.From([FEQUNIT])&"   ,   "&Text.From([ROUTE]))
Specializing in Power Query Formula Language (M)

Thanks!  I've been looking at this so long that I missed the obvious!  🙂

 

I corrected and now I get a different error.  See attached.  CombiningColumns_ExpressionError.jpg

Well, the message looks quite obvious: you are refering to a field [FEQUNIT} that doesn't exist.

Just verify and correct the field name.

Note: PowerQuery is case sensitive, e.g. "FEQUNIT" is not "FeqUnit".

Specializing in Power Query Formula Language (M)

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.