Forum Discussion
smallint values from sql query shown as data type text
- 6 years ago
Hi Anonymous
Normally it does it automatically, but if it hasn't you can add this step by going to Transform > Detect Data Type or click on the data type on the left of the column and pick the type manually.
Best Regards,
Mariusz
If this post helps, then please consider Accepting it as the solution.
Please feel free to connect with me.
LinkedIn
Hi Anonymous
Normally it does it automatically, but if it hasn't you can add this step by going to Transform > Detect Data Type or click on the data type on the left of the column and pick the type manually.
Mariusz
If this post helps, then please consider Accepting it as the solution.
Please feel free to connect with me.
Hi Mariusz,
yes the solution of converting the values inside PowerBI works and should not lead to much performance impact as it is a numeric conversion.
Also the conversion detection button works by suggesting "whole number" as target data type.
I do the conversion a step before in SQL Server by "CAST(myVal as INT) myVal".
I'm wondering, why "int" values of sql queries are detected as whole numbers, but "smallint" values as "decimal numbers". Looks like a bug to me?
Best regards,
Thomas
- Mariusz6 years agoCommunity Champion
Hi Anonymous
Just tested on my end and it's doing the same thing with small and tiny int as well, surely this looks like a bug.
If you wish to report it, you can do it here:
https://community.powerbi.com/t5/Issues/idb-p/IssuesBest Regards,
Mariusz
If this post helps, then please consider Accepting it as the solution.
Please feel free to connect with me.
LinkedIn