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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
Sammynm
Frequent Visitor

Custom Column text values generating error

Good day, I created a custom column for decimals and text. In the Custom Column window I saw the message that there were no syntax errors but when I clicked ok and the column was entered into the table, errors loaded in place of the text entries. What should i do here?

10 REPLIES 10
v-yanjiang-msft
Community Support
Community Support

Hi @Sammynm ,

According to your description, I reproduce your problem. In the add Custom Column dialog, it shows no syntax errors, just means that the formula is grammatically correct, does not mean that the correct result can be obtained.

vkalyjmsft_0-1651572178012.png

Click on the yellow Error word, you can see the error detail, in my sample it is data format error. If the column referenced in the custom column itself has an error, then the custom column must also have an error.

vkalyjmsft_1-1651572622274.png

 

Best Regards,
Community Support Team _ kalyj

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

Hi @v-yanjiang-msft  

 

Thank you for drawing my attention to the error message. Yes I does state that it couldn't convert the text to a number. But even when I click Change Type and select Text as @HotChilli suggested it still gives me the same error message for the same text values. see below 

 

Sammynm_0-1651582181707.png

 

Hi @Sammynm ,

May I know if the column referenced by your custom column is in the error state? 

Best Regards,
Community Support Team _ kalyj

Hi @v-yanjiang-msft , yes the original column is in the same error state. I actually removed the custom column since it did not help resolve the issue. Again, the problem is that the column is not recognizing the text values in the column, which both text and numeric values. And again the column has been assigned as a Text column.

Hi @Sammynm ,

If the original column has error, the custom column certainly be error.

 

Now what we say the original column, Is it always in the data source? If you manually enter a table with the error column in Power Query, see if there are any errors.

 

I don't think it has anything to do with the fact that your column contains several data types. You can simply give an example and try it. The Text type will not go wrong. It should be related to what you have done to this column in Power Query.

 

Best Regards,
Community Support Team _ kalyj

Hi, I resolved it. I had to delete the steps Power BI suggested and then assign the column myself.

HotChilli
Super User
Super User

The custom column is having to deal with data that already has errors.  It won't fix them.  You need to look at the Power Query steps before this.

Let's assume that the error is because there are non-numeric values in a column which has decimal data type (You can confirm this by clicking in a cell which has an error - but not on the error text itself).

Anyway, back to the problem.  Somewhere in the Previous steps, the column will be assigned a decimal type.

You need to edit the step which does that.  It will probably be called #"Changed Type" or similar.  You can either delete the small section of code which makes the column a decimal or alter it  to be text type

KT_Bsmart2gethe
Impactful Individual
Impactful Individual

Hi,

 

My understanding from your explanation above, you created a custom column which value contains "decimals & text". Number and Text are two different type. If you want to return a text column, and you will will need "Number.FromText([decimals]). This function will turn the decimals into text. I hope I have answered your question. if not, please share a screenshot or example of the error and what are your desire outcome.

Hi thanks for the response. The image below is the output i want in PBI. Some values are decimals/prices and some are text in this same column.

 

Sammynm_0-1651241058322.png

 

This is the error that appears in PBI desktop/Power Query screen. The first column was the original load. It was assigned as a decimal column. I think created the second column as a custom column thinking that it would recognize the text and the numbers but the same text values error out. I hope this helps explain better.

 

Sammynm_1-1651241425311.png

 

 

Hi,

 

With the minimum context. I would suggest define the column as a text column. Number can be read as a text but text cannot be read as number. If your the number for calculation, you can create two custom column. One is refer to the column where you define text where the number column you will need Number. FromText(), which will convert the number from text to number.

 

I hope it helps.

 

Regards

Kerwin

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Kudoed Authors