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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors
Top Kudoed Authors