Forum Discussion

Zorgonaute84's avatar
Zorgonaute84
Regular Visitor
8 years ago
Solved

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

  • 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.

  • Zorgonaute84

     

    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.

    • Zorgonaute84's avatar
      Zorgonaute84
      Regular 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-msft's avatar
        v-xjiin-msft
        Solution Sage

        Zorgonaute84

         

        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.

  • 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.