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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
fedosklyar
Regular Visitor

Issues with conversion from text to decimal

Hello to everyone.
I faced with issue of interpreting of column type by PowerBI.

Loading data from data warehouse, the type of one of columns from fact table was determined as text, despite, inside DBMS(postresql, in my situation) it is defined as numeric (4,2)
psgsql.png


Also, I decided to check the data using python, and, after loading dataframe and checking info about it, I was informed that the type is correct, and has float64 type, as I expected and how need be

fedosklyar_0-1711868601690.png


But, within the PowerBI, that field interpreted as Text and after trying different methods of conversion to decimal (using powerBI tools and editing the query), I got the error messages

fedosklyar_1-1711868706803.png

fedosklyar_3-1711868740264.png





fedosklyar_4-1711868769493.png

fedosklyar_5-1711868796452.png

 

Probably, anybody have previously faced with such issue, or, at least have an idea how it can be fixed?

Also, a sample of data from fact table

fedosklyar_6-1711868890140.png

 


1 3418 2 16 0.01 55 "tbd" 11007
2 1408 1 7 0.34 79 "8.6" 12888
3 2108 2 11 0.00 53 "6.6" 8719
4 3406 2 11 0.28 80 "8.7" 8928
5 506 1 4 0.15 50 "5.0" 9943
6 1908 2 17 0.01 77 "7.7" 12384
7 4259 2 6 0.08 77 "7.8" 8914
8 1337 1 16 0.10 69 "6.8" 9326
9 533 1 6 0.04 45 "4.6" 11899
10 4527 1 11 0.05 52 "7.2" 11891

5 REPLIES 5
PhilipTreacy
Super User
Super User

Hi @fedosklyar 

 

When you click on Keep Errors the table that is displayed is just rows with errors - click beside an error and towards the bottom of the screen you'll see the error message describing why that has has occurred.  You can then take action to fix the errors.

 

Phil

 



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


Hi, Phil

Thanks for that tip. After fullfilling actions, mentioned by you, I have seen the error message, and the appearence of that is next

fedosklyar_0-1712038299602.png



The ways to solve that problem is still ambiguous for me... Probably, anybody have an idea, what is the possible methods to fix that issue?

P.S. I tried different ways to manually specify the type, both type number and Decimal.type, and always the same problem occurs

PhilipTreacy
Super User
Super User

Hi @fedosklyar 

 

To manually specify a decimal data type just use type number 

 

If it still gives you errors there must be something in the column that Power Query considers as text.  Check the column for such values.

 

When you attempt the conversion from text to decimal, and you get am error, the celsl that cause the error wil contain the word Error 

 

You can click on the top left corner of the table

 

errc1.png

 

and from the menu choose Keep Errors

 

errc2.png

 

Which will then show you the rows causing the problems.  Check what the values in those rows are.

 

Regards

 

Phil

 



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


Hi, Phil

Really grateful for your answer.

I inspected my column as you recommended, and, to my surprise, it displays all cells as invalid

fedosklyar_0-1711876029083.png


And I have no idea, what caused such behavior and what the are the ways fo solve that problems

Sincerely,
Fedir

Anonymous
Not applicable

Hi @fedosklyar 

 

Perhaps you have missed @PhilipTreacy 's first sentence "To manually specify a decimal data type just use type number ". See below image, either "type number" or Decimal.Type should work. "type Decimal.Type" is incorrect. 

vjingzhanmsft_0-1712029052521.png

 

Best Regards,
Jing

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors