Forum Discussion
PowerBI Reads Text as INT
- 4 years ago
Thanks for these links. I found them, too. They both confirm my finding that Power BI does not let me convert field types as they are read. I have to go back into my original server and re-sort the data so that Power BI sees its proper type. Taking off the "auto detect type" flag didn't work, and I don't have access to tell Power BI to read 1,000 rows to identify type. So I'm stuck reworking the original data.
Power BI always try to convert the data types by probing the first 100 or 200 rows. (built-in intelligence)
Check your M query and alter it if this is the case. (Advanced editor will help for faster )
Remove the column transformation in the changed type.
hope this helps!
Thank you for this hint. Do I put this command in the Advanced Options tab before I open the query, or as part of the load query?
- sevenhills4 years agoSuper User
- It is part of the M query for loading and transformation.
- I pasted the pics to get you an idea.
Power BI, when you bring the data, it works like this: when you connect to the source, it will gather all the info and try to bring the fields, then it converts to appropriate data types (i.e., Say, for timebeing, only if the fields are not text).
Your fix can be one of the following:
- Say, in the data conversion step,
- if you have only one column that is being converted, then you can remove the full data type conversion step
- if you have more than one column that are being converted, then you can manually remove those columns that are not needed in the data conversion step
Hope this helps!