question

yg1982-3254 avatar image
0 Votes"
yg1982-3254 asked DSPatrick answered

Power-Query - Change data type of all columns in a table

Hi,

If I want to transform the data type of all columns in a table (the number and the name of the columns can change in the future).
In another question I found the following solution
let Source = Excel.CurrentWorkbook(){[Name="YourTable"]}[Content], LSTHeaders = Table.ColumnNames(Source), HowMany = List.Count(LSTHeaders), Transformation = Table.TransformColumnTypes( Source, Table.ToRows(Table.FromColumns({LSTHeaders, List.Repeat({type number}, HowMany )}))) in Transformation

It works fine but I don't know how to apply "en-US" data format.
I tried the following but didn't work:

  Transformation = Table.TransformColumnTypes( Source, Table.ToRows(Table.FromColumns({LSTHeaders, List.Repeat({
                 {type number}, "en-US"}, HowMany  )})))


Any help? Thanks


power-query-not-supported
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

DSPatrick avatar image
0 Votes"
DSPatrick answered

Power query is not currently supported here on Q&A. The product group for Power Query actively monitors questions over at
https://community.powerbi.com/t5/Power-Query/bd-p/power-bi-services


--please don't forget to Accept as answer if the reply is helpful--


5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.