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.
up
Sorry for delayed reply.
I have made a simple test, however I didn't encounter your issue. My Power BI desktop version is (Feb 2018 update), I'm using OLE DB Provider for SQL Server connecter. And my source data is from a common SQL Server table (decimaltest) and the val column is Time type:
I have used following T-SQL script to convert Time to Decimal:
select *,cast(DATEDIFF(mi,CONVERT(time,'00:00:00'), CONVERT(time,val))/60.0 as decimal(6,5)) as duration from decimaltest
Then I put above script in Advanced options when getting data from OLE DB. The result is Power BI desktop is like this:
It works fine.
Thereby, please kindly make a more detailed description about how you get data from OLE DB in Power BI? And what's the difference between my sample?
Thanks,
Xi Jin.