andydtaylor
Active Member
- Joined
- Feb 15, 2007
- Messages
- 360
- Office Version
- 2016
Hi,
Is there a way that I can make the last line of this Power Query statement dynamic? i.e. always expand all columns?
Thanks,
Andy
Is there a way that I can make the last line of this Power Query statement dynamic? i.e. always expand all columns?
Code:
let
// Get path
Pathparameter = Excel.CurrentWorkbook(){[Name="sys_im_parameters"]}[Content],
Pathparameter_value = Pathparameter{0}[Column1],
//main query
Source = Folder.Files(Pathparameter_value),
#"Filtered Hidden Files1" = Table.SelectRows(Source, each [Attributes]?[Hidden]? <> true),
#"Invoke Custom Function1" = Table.AddColumn(#"Filtered Hidden Files1", "Transform File from input_modules", each #"Transform File from input_modules"([Content])),
#"Renamed Columns1" = Table.RenameColumns(#"Invoke Custom Function1", {"Name", "Source.Name"}),
#"Removed Other Columns1" = Table.SelectColumns(#"Renamed Columns1", {"Source.Name", "Transform File from input_modules"}),
#"Expanded Transform File from input_modules" = Table.ExpandTableColumn(#"Removed Other Columns1", "Transform File from input_modules", {"Source", "Month", "Description", "Amount", "Source_WS", "Entity", "Value_type", "Route", "Active flag", "Type"}, {"Source", "Month", "Description", "Amount", "Source_WS", "Entity", "Value_type", "Route", "Active flag", "Type"})
in
#"Expanded Transform File from input_modules"
Thanks,
Andy