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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
hxwt
New Member

[BUG] Custom Column Number.ToText Does Not Convert Unless SELECT Statement in SQL Is Used

I have two Queries in the same report, accessing the same SQL table - one uses SELECT * FROM [Table] statement under Advanced Options to access the data, and the other uses [Database]{[Schema="dbo",Item="[Table]"]}[Data]. Both have a custom column added using a [Result] column typed as a decimal number.

 

#"Added Custom" = Table.AddColumn(Source, "Custom", each Number.ToText([Result], "x"))

 

The SELECT table results form as expected, with a custom column containing the decimal number in [Result] coverted to hexadecimal format. The [Database]{[Schema table has a custom column, but it's just the [Result] number without conversion. It doesn't seem to be just a UI bug - when I apply the changes, the data in the table remains unconverted. Is this reproducable for anyone else?

1 ACCEPTED SOLUTION
v-jingzhang
Community Support
Community Support

Hi @hxwt 

 

I can reproduce the same result at my side. The workaround is to add a step before adding the custom column to convert the [Result] column from Decimal Number data type to Whole Number type. This can get the column converted correctly. You may have a try. 

vjingzhang_0-1676442439410.png

 

Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.

View solution in original post

1 REPLY 1
v-jingzhang
Community Support
Community Support

Hi @hxwt 

 

I can reproduce the same result at my side. The workaround is to add a step before adding the custom column to convert the [Result] column from Decimal Number data type to Whole Number type. This can get the column converted correctly. You may have a try. 

vjingzhang_0-1676442439410.png

 

Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

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