Forum Discussion

iannes's avatar
iannes
New Member
8 years ago
Solved

Scientific Notation read as text

My data source has numbers like: 2.0458e+2 and 3.0465e-4 

They are currently being read as text, changing collum type in the query editor is not working

How do i  make power BI read them as a numeric value?

 

  • Greg_Deckler's avatar
    Greg_Deckler
    8 years ago

    BTW, I entered those numbers into an Enter Data query and M converted them. Here is my query:

     

    let
        Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMtIzMDG1SNU2UorViVYyBvLMTFN1TZRiYwE=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type text) meta [Serialized.Text = true]) in type table [eNumbers = _t]),
        #"Changed Type" = Table.TransformColumnTypes(Source,{{"eNumbers", type number}})
    in
        #"Changed Type"

3 Replies

  • Greg_Deckler's avatar
    Greg_Deckler
    Icon for Community Champion rankCommunity Champion

    You may have to parse it by keying on the "e" and calculate it manually.

    • Greg_Deckler's avatar
      Greg_Deckler
      Icon for Community Champion rankCommunity Champion

      BTW, I entered those numbers into an Enter Data query and M converted them. Here is my query:

       

      let
          Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMtIzMDG1SNU2UorViVYyBvLMTFN1TZRiYwE=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type text) meta [Serialized.Text = true]) in type table [eNumbers = _t]),
          #"Changed Type" = Table.TransformColumnTypes(Source,{{"eNumbers", type number}})
      in
          #"Changed Type"
      • Anonymous's avatar
        Anonymous
        Not applicable

        Hi,

         

        I have a issue about some numbers in a column (messure numbers), maybe you can help me out.

        changing collum type in the query editor and modeling is not working

         

        How do i make power BI read them as a numeric value?

         

        this picture above is an example the numbers should be.

         

         

        Thank you

         

        Best regards

         

        Seb