Search code examples
powerquery

Power Query - How to convert all columns to type TEXT


How can i convert all columns in a table to type TEXT (where the number of columns on refresh will change every time therefore this has to apply for all columns and i cannot select the columns manually)

I have tried answers from ChatGPT but without any luck


Solution

  • You can try adding a new step similar to:

    Table.TransformColumnTypes(
     Source,
     List.Transform(
       Table.ColumnNames(Source),
       each {_, type text}
     )
    )