Forum Discussion
Trying to create a new column based on the query or source file name.
- 6 years ago
Hi dmarics28 ,
Try to change the code of your Append query in the Advanced Editor.
let Source = Table.Combine({Table.AddColumn(#"query A", "source query", each "query A") , Table.AddColumn(#"query B", "source query", each "query B") , Table.AddColumn(#"query C", "source query", each "query C")}) in SourceBTW, .pbix file attached.
Best Regards,
Icey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi dmarics28 ,
Try to change the code of your Append query in the Advanced Editor.
let
Source = Table.Combine({Table.AddColumn(#"query A", "source query", each "query A")
, Table.AddColumn(#"query B", "source query", each "query B")
, Table.AddColumn(#"query C", "source query", each "query C")})
in
Source
BTW, .pbix file attached.
Best Regards,
Icey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Icey
Thanks that did work.
However, i have about 20 or 30 data sources, and typing each one is very time consuming.
And need to edit the code each time i need to add another source.
If somehow there was a formula instead on manually typing source name in the advanced editor, that would help.
But thanks to everyone who put some ideas forward on this.