Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Dynamically return all column names

Hi In power query i have the following which dynamically reads the column names for outputting. Im just wondering if there is a cleaner solution whereby i dont have to transform each column but rath...
  • Anonymous's avatar
    Anonymous
    6 years ago

     

    I hadn't noticed. Try it this way (or a differente combination of text and number :-)):

     

    #"Changed Type"=Table.TransformColumnTypes(Source, {DynamicNameHeader{0}, type text}& List.Transform(List.Skip(DynamicNameHeader,1), each {_, type number}))

  • Anonymous's avatar
    Anonymous
    6 years ago

    Got it!....If i just remove Columns=18, it works then...thanks for your help