Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago

Error in column

Hi,

 

I have a column formated as text with 2 types of data. 1) 12345 and 2) AB123. Now I am looking for a way to have them in same column without Error

 

thanks  

17 Replies

  • AntrikshSharma's avatar
    AntrikshSharma
    Community Champion

    Anonymous Then you can add a new column and use Value.FromText.

    Table.AddColumn ( PreviousStep, "TextOrInt", each Value.FromText ( [Column] ), type any )
    • Anonymous's avatar
      Anonymous
      Not applicable

       

      • AntrikshSharma's avatar
        AntrikshSharma
        Community Champion

        Anonymous Read the error! You are missing closing parenthesis and what is your previous step? use that in the first argument.

  • v-yalanwu-msft's avatar
    v-yalanwu-msft
    Community Support

    Hi, Anonymous ;

    You could create a custom column as follow:

    =Value.FromText ( [Column] )

     

    The final show:


    Best Regards,
    Community Support Team _ Yalan Wu
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

    • Anonymous's avatar
      Anonymous
      Not applicable

       

      • v-yalanwu-msft's avatar
        v-yalanwu-msft
        Community Support

        Hi, Anonymous ;

        Can you share error details or simple files? Too little information is known through pictures.


        Best Regards,
        Community Support Team _ Yalan Wu
        If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

  • v-yalanwu-msft's avatar
    v-yalanwu-msft
    Community Support

    Hi, Anonymous ;

    The same column can only have one type, because some values in a column in your data contain non-numeric characters, so it cannot be converted, if you can, can you give some examples and the result that this example hopes to output?

    I don't  understand what you want to do.


    Best Regards,
    Community Support Team _ Yalan Wu
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

    • Anonymous's avatar
      Anonymous
      Not applicable

      i want to change type of column to any so it will remove the Error so it can read of them 
      1) 12345
      2) AB123.
      thanks

    • AntrikshSharma's avatar
      AntrikshSharma
      Community Champion

      Last Applied Step in your query, like Source, ChangedType etc.

      • Anonymous's avatar
        Anonymous
        Not applicable

         

  • v-yalanwu-msft's avatar
    v-yalanwu-msft
    Community Support

    Hi, Anonymous ;

    Is your problem solved?  If so, kindly mark the proper reply as a solution to  close the case. If not, let me know and I'll try to help you further.


    Best Regards,
    Community Support Team _ Yalan Wu
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

    • Anonymous's avatar
      Anonymous
      Not applicable

      my problem is not solved

      • v-yalanwu-msft's avatar
        v-yalanwu-msft
        Community Support

        Hi, Anonymous ;

        If the above one can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.

        How to upload PBI in Community


        Best Regards,
        Community Support Team _ Yalan Wu
        If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.