Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Convert to Text error - adds additional numbers

I have a column called Item No, which is not really a number. Some of the values do contain letters. However, when I convert the field to text, additional numbers are added to the end as if there was a reverse rounding... I want to use this column for a join where the other table has the column as Text. I even tried changing the column in the original Excel file, but PowerBI still reads it as general. Please advise. Thank you!

 

 

  • Anonymous , find the first step where the data type is changed. Make it test on that step. Click on that step and try to change. It should ask to overwrite that step or add new. Overwrite.

3 Replies

  • Anonymous , find the first step where the data type is changed. Make it test on that step. Click on that step and try to change. It should ask to overwrite that step or add new. Overwrite.

  • Anonymous's avatar
    Anonymous
    Not applicable

    = Table.TransformColumnTypes(#"Renamed Columns",{{"Item Number", type text}})

     

    The Item Number changes when I change the type from Decimal to Text.

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi  Anonymous ,

     

    It can be that before putting into Excel, the original data format is 27.000299999Excel automatically rounded to 27.0002. Then importing this excel to power bi will keep that rounded format.

     

    You can try to modify a few rows of data to 3 decimals e.g. 27.0002 in Excel. And import into power bi again, check If the modified data remains with 3 decimal number or still add additional integers.

     

    Best Regards,

    Liu Yang

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.