Forum Discussion
Decimal data strange issue
- 8 years ago
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.
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
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.
- Zorgonaute848 years agoRegular Visitor
This is a screenshot from PowerBI :
The same SQL request from Excel :
And the values display in the original source :
The value from Excel are good, but from PowerBI the 1st is correct, but the second is multiplied by 100.
- v-xjiin-msft8 years agoSolution Sage
So, in your original souce the values are time. However in Power BI or Excel, they are decimals. How did you format time to decimal? Could you please share us your expression or something which can help us to make a test if possible?
Thanks,
Xi Jin.- Zorgonaute848 years agoRegular Visitor
Hello,
No, I didn't reformat anything. The raw format is decimal (it's represent the duration in hours). And it's in the original source where the value is reformated like hh:mm:ss
So for 00:25:00 in the original source (25 minutes), I should have 0.416667 in GBH (0.41 hours).