Forum Discussion
Decimal data strange issue
Hello,
I'm using PowerBI from 2 months ago now, and I occure a very strange issue regarding decimal data.
In fact, my data is a duration in hours. So 20 minutes is 0.3 hours. The problem with my data is some lines are correct, but someones are multiplied by 100 without any reasons.
I'm connected to my data with a OLEDB connector and when I configured the same connection into Excel, the data are correct. Any idea ?
Thanks a lot for your help.
Hello,
I finally fixed my issue !
I CAST my field as a float in my SQL request :
SELECT CAST(GA_NBH as Float) as GANBH
So my new field GANBH is now correct !!! No idea why I had to do that, and why some value was correct and other not.
10 Replies
- Zorgonaute84Regular Visitor
Hello,
I'm using PowerBI from 2 months ago now, and I occure a very strange issue regarding decimal data.
In fact, my data is a duration in hours. So 20 minutes is 0.3 hours. The problem with my data is some lines are correct, but someones are multiplied by 100 without any reasons.
I'm connected to my data with a OLEDB connector and when I configured the same connection into Excel, the data are correct. Any idea ?
Thanks a lot for your help.
- v-xjiin-msftSolution Sage
Based on your description, it seems like your issue is related to something like decimal rounding which is caused by ODBC connector. There may exists compatibility issue between the connector and Power BI.
To troubleshooting it, I would suggest you to keep one time type field data in source table and after importing the source table in Power BI, do the formatting at Power BI desktop side. To verify if the issue persists.
Thanks,
Xi Jin.- Zorgonaute84Regular Visitor
Hello,
Thanks for your help.
But I have the issue in the Query Editor and in Power BI. I tried to localize the decimal value, to apply rounding etc... But nothing change. The strange thing is, I used the same OLEDB connector into Excel, and I havn't this issue. The data are correct.
Any idea ?
Thanks
- v-xjiin-msftSolution Sage
Power BI is different with Excel for OLEDB connector.
Could you please share us some screenshots about your issue if possible? So that we can understand your issue more clearly.
Thanks,
Xi Jin.
- Zorgonaute84Regular Visitor
Hello,
I finally fixed my issue !
I CAST my field as a float in my SQL request :
SELECT CAST(GA_NBH as Float) as GANBH
So my new field GANBH is now correct !!! No idea why I had to do that, and why some value was correct and other not.