Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
8 years ago
Solved

DataFormat.Error We couldn't convert to Number..

I have a .pbix file that has been running great for two weeks, refreshing as expeted.  The source of these dashboards are two .csv files.

 

All of a suddent I am receiving the message below:

 

 

I have read a lot of the messages in the forum, with no luck in resolving the issue.  Is there a way to identify where the problem is, and how to resolve it?

 

Thanks.

  • Did you change the columns in the editor? Make sure you go back and replace the steps - otherwise it will try to convert to number, then back so will still errror out.

     

    In the applied steps in the Query Editor, make sure you go back to all the changed type steps and click on them. Then, you can do your tranaformation on this step. Make sure you click replace current.

     

     

    Power BI usually looks at a subset of rows to determine the format. It is likely you have a column with many numbers and a small amount of text somwhere.

6 Replies

  • SteveCampbell's avatar
    SteveCampbell
    Memorable Member

    In the csv, something has been entered that is not a number. Check your csv files.

     

     

    Otherwise, it's possible that it could be an ID column that was just numbers, so power bi assigned this column as a number, but now has a text value (e.g. 51215, 02150, C6767).

    If so, go to the query editor and check the column formats (it will say 123) next to the column. On the applied steps, locate "Changed Type", click on this, thenm change the format of the column to text, and click replace current step when asked. 

    • Anonymous's avatar
      Anonymous
      Not applicable

      SteveCampbell

       

      Steve thanks for the advice.  Based on the size of the .csv file the recirds is not easily identified.  In my ,pbix file I changed all the columns to text, and it still failed to load.

       

      In another example, I loaded the file to a NEW .pbix - complared the applied steps - and still had the same issues.

       

      Any thoughts?

      • SteveCampbell's avatar
        SteveCampbell
        Memorable Member

        Did you change the columns in the editor? Make sure you go back and replace the steps - otherwise it will try to convert to number, then back so will still errror out.

         

        In the applied steps in the Query Editor, make sure you go back to all the changed type steps and click on them. Then, you can do your tranaformation on this step. Make sure you click replace current.

         

         

        Power BI usually looks at a subset of rows to determine the format. It is likely you have a column with many numbers and a small amount of text somwhere.