Forum Discussion

Joachim2108's avatar
Joachim2108
Helper I
5 years ago
Solved

Decimal separator missing when importing data

Hi all,

 

I'm stuck with a very annoying issue - when I import data via an ODBC driver (connected to ERP software called Microsoft XAL), the decimals in the numerical collumns disappear! 

 

E.g. 2.500,50 turns into 250054 or 1,5 turns into 15.

 

The IT staff say the ERP system has an American file format (decimal separator as a period), and when data is exported to Excel, it automatically recognises the difference and converts it to the european standard (decimal separator as a comma) without any issue.

 

I also know that there is an option in Power BI to change regional settings, and I have tried many different combinations. However when I do so for the current file (Locale), and update the query, it registers errors in most of the collumns, and gives me the following message: 

 

Any ideas as to what is going wrong? Any solutions would be of great help. Thanks in advance.

  • Joachim2108's avatar
    Joachim2108
    4 years ago

    The solution in the end had to do with how I import my data. My organisation uses an Oracle Database (a very old 32 bit version), and when getting data, I would select "ODBC" which would then result in the issue of missing decimals. 

     

    The solution in the end was simply to select "Oracle database" when importing data. No issues followed after that.

8 Replies

  • selimovd's avatar
    selimovd
    Most Valuable Professional

    Hey Joachim2108 ,

     

    after the first step in importing the data in Power Query change the type using locale: 

     

     Then change the format to to decimal number and region United States:

    Afterwards you will have the numbers in the right format.

     

    If you need any help please let me know.
    If I answered your question I would be happy if you could mark my post as a solution ✔️ and give it a thumbs up 👍
     
    Best regards
    Denis
     
    • Joachim2108's avatar
      Joachim2108
      Helper I

      Hi Denis,

      Changing regional settings does not seem to work. When I do change the settings (Using Locale), Power BI gives me the message that i posted in my original post.

    • Joachim2108's avatar
      Joachim2108
      Helper I

      Hi amitchandak,
      Changing regional settings does not seem to work. When I do change the settings (Using Locale), Power BI gives me the message that i posted in my original post.

  • DataZoe's avatar
    DataZoe
    Microsoft Employee

    Joachim2108 I would try to bring the column in as text, then replace the commas with periods, and then change the type back to decimal in the transform data screen. You may need to go up the applied steps a bit to before it intitally tries to change to to a decimal.

    • Joachim2108's avatar
      Joachim2108
      Helper I

      Hi DataZoe,

      The issue is that I can see this in the preview window before loading the data, that there is no decimal separator at all. So when transforming the data, there is no comma or period to replace unfortunately.

  • Hello, I imagine you have already solved the problem, however, for people looking for an answer to this dilemma, what worked for me was to consult the values that do not appear correctly, add the function To_number (column) and in this way identify it as a number.

    I hope it works for you.

    • Joachim2108's avatar
      Joachim2108
      Helper I

      The solution in the end had to do with how I import my data. My organisation uses an Oracle Database (a very old 32 bit version), and when getting data, I would select "ODBC" which would then result in the issue of missing decimals. 

       

      The solution in the end was simply to select "Oracle database" when importing data. No issues followed after that.