Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago

Improper format for numeric fields in Power query

Hello,

 

I am using SAP BW as a data source in my Power BI reports. When i am importing data in Power BI desktop via Power Query Editor, few of the values in a numeric field seem to be imported in a strange format. I am not able to do any kind of conversion to fix these values, which causes loss of data. I have attached a sample screenshot of how the numbers look like. Any ideas, what could be the issue and how we can get rid of this?

 

3 Replies

  • artemus's avatar
    artemus
    Microsoft Employee

    I don't really know much about SAP BW, but my only theory is that there is something wierd in the RSRCURRDISP table causing the parsing to fail. Has this table been modified from its default values?

  • Anonymous's avatar
    Anonymous
    Not applicable

    Instead of converting to a type, try inserting the line below the Source. It might turn the data into a number. You can then proceed with setting the rest of your types.

     

    = Table.TransformColumns(Source,{{"MTD_Balance_LC2", each Number.From(Text.Replace(Text.From(_),"*","")), type number}})

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi,

       

      Thanks for getting back. But my issue is not actually to replace the _,* in the data. In the source , there is valid data for this. Like for the value _*556217.0700000000 , the source has a value 15556217.07. So in reality, when I import the data in Power BI, I am losing data and getting this weird data format.