Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Problem with DataFormat.Error: We couldn't convert to Number.

Hi!    I'm connecting to a data source via Custom Connector. When I check the query in the Query editor, I see that some columns have the error "DataFormat.Error: We couldn't convert to Number.". I...
  • Anonymous's avatar
    Anonymous
    6 years ago

    Hi ImkeF , 

     

    Sorry for the unclear description. However, you were still able to get to the point. It seems that Custom Connector formatting the data before uploading to the Power BI/Power Query Editor was the problem.

     

    For future reference, I needed to download & install Visual Studio and install Power Query SDK extension to the Visual Studio. After that, I opened the Custom Connector .sln file in the Visual Studio and edited the code in a way that the data type was set to required columns as text instead of number. After that, from top ribbon click Build solution and you may find the updated .mez file in the Custom Connect files in "CustomConnector(name)/bin/debug. Finally, put this .mez file to the documents/Power BI Desktop/Custom Connector folder. 

     

    The process was fairly easy, as long as you have access to the Custom Connector files!

     

    Thank you,