Forum Discussion
Import number w/ decimal position from MySQL db
I am trying to import data with decimal positions from MySQL DB , my data looks like this in my database:
637272.88842
28642.0398
7255384.8920
But when I import the data in Power BI I can't get the decimals, and the numbers look like this:
637272.000
28642.000
7255384.000
I have already changed the data type format to decimals. I tried to do changes from Power Query and Power BI Desktop, but I can't fix the problem. How can I change my data type and get those decimals? I don't need all the decimals either, just the first two would be enough.
Hi Anonymous
When you import the data from MySQL DB, is there a Change Type step in Applied Steps pane in Power Query Editor? If there is, you could remove this auto-generated step and change the data type of each column per your need. After you remove this step, does this column show the decimals correctly?
Regards,
Community Support Team _ Jing
If this post helps, please Accept it as the solution to help other members find it.
4 Replies
- amitchandakSuper User
Anonymous , In power query, right-click on the table and open advance editor and check do see column and data type there. if it is Int64 there, change it to decimal in that code
steps are very similar like
- AnonymousNot applicable
Thanks for your answer and the link to the video.
- v-jingzhangCommunity Support
Hi Anonymous
When you import the data from MySQL DB, is there a Change Type step in Applied Steps pane in Power Query Editor? If there is, you could remove this auto-generated step and change the data type of each column per your need. After you remove this step, does this column show the decimals correctly?
Regards,
Community Support Team _ Jing
If this post helps, please Accept it as the solution to help other members find it.- AnonymousNot applicable
Thanks! That was very helpful!