Forum Discussion

RonvdLaan's avatar
RonvdLaan
Frequent Visitor
2 years ago
Solved

Convert a string in to a number

How can i convert this string (8,66719E+14 ) in to a regular number in power query?

  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi RonvdLaan 

     

    Power Query is for cleaning and preparing your data. In Power Query Editor you can change the data type but you cannot change the data format. But don't worry, what you see isn't necessarily how it will look when it's in a report/visual. Ensure the column is of Decimal number data type, then load data into Power BI Desktop. You can then change the format to Decimal number there.

     

    Best Regards,
    Jing
    If this post helps, please Accept it as Solution to help other members find it. Appreciate your Kudos!

2 Replies

  • collinsg's avatar
    collinsg
    Solution Sage

    Good day RonvdLaan 

    This code will convert text in column "Number" to a number. Replace "#"Previoius Step" with the name of the previous step in your query.

    = Table.TransformColumns( #"Previous Step", {{"Number", each Value.FromText(_), type number}} )

    Hope this helps 

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi RonvdLaan 

     

    Power Query is for cleaning and preparing your data. In Power Query Editor you can change the data type but you cannot change the data format. But don't worry, what you see isn't necessarily how it will look when it's in a report/visual. Ensure the column is of Decimal number data type, then load data into Power BI Desktop. You can then change the format to Decimal number there.

     

    Best Regards,
    Jing
    If this post helps, please Accept it as Solution to help other members find it. Appreciate your Kudos!