Forum Discussion

prothinker's avatar
prothinker
Frequent Visitor
5 years ago

Copy Changed Type

Hi 

I have this pbix file https://drive.google.com/file/d/1cXmhlrhnx3FLgIkx03hypBDaETE-pPFd/view?usp=sharing

I have formatted the data in sheet 1 as whole number and the data in sheet 2 as text. When I click on transform data, both columns have "123" indicating that both are numbers. Why is this so?

Is there a way to go to Changed Type and copy the contents from the formula bar for one table and paste it to another table. This is useful when I have to change the data type for multiple columns and don't want to repeat the process.

 

Thanks.

 

5 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    HI prothinker 

    It is the same column from same table, which can be of only one type. either number or text.

    What ever type you selected at the end will be reflected on both the sheets.

    • prothinker's avatar
      prothinker
      Frequent Visitor

      Hi

      Thanks for your reply.

      The column names are the same but they are from two different tables one in Sheet 1 and the other in Sheet 2.

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hello prothinker ,

     

    Once you have changed the type of both the columns in editor, it will be remain same until you change it.

    Please find my pbix file here pbix file 

     

    And yes, you can change the type of more columns in one ago by specifying in formula bar with columnname and their type, like below with the braces.

     

    = Table.TransformColumnTypes(#"Added Index",{{"Column 1", type text}, {"Column 2", type text}})

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi prothinker ,

     

    For the idea you put forward, there is no such function that can be realized at present. You can submit your idea and vote on this website

     

    There is a function to automatically detect the data type, hopefully it can reduce your unnecessary operations.

     

    Best Regards,

    Stephen Tao

     

    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

    Hi prothinker ,


    Sorry to disturb you...


    But did I answer your question ? Please mark my reply as solution. Thank you very much.

     

    Best Regards,
    Stephen Tao