Forum Discussion
Append queries (Automation)
- 8 years ago
Hi gtamir,
"is it possible to merge as new?"
<-- Yes, change step Merged Columns with M code below:
= Table.AddColumn(#"Changed Type", "Merged", each Text.Combine({Text.From([PharmacyCode], "zh-CN"), Text.From([CustomerCode], "zh-CN")}, "-"), type text)"It didn't merge the columns for the appended file."
<-- "Append" operation will not automactically merge columns in the appended table. As a workaround, to achieve your requirement, you can append 'Sheet1' to 'Sales' firstly, then Merge columns PharmacyCode and CustomerCode as a new merged column.
Hope it's helpful to you.
Jimmy Tao
Hi gtamir,
"is it possible to merge as new?"
<-- Yes, change step Merged Columns with M code below:
= Table.AddColumn(#"Changed Type", "Merged", each Text.Combine({Text.From([PharmacyCode], "zh-CN"), Text.From([CustomerCode], "zh-CN")}, "-"), type text)
"It didn't merge the columns for the appended file."
<-- "Append" operation will not automactically merge columns in the appended table. As a workaround, to achieve your requirement, you can append 'Sheet1' to 'Sales' firstly, then Merge columns PharmacyCode and CustomerCode as a new merged column.
Hope it's helpful to you.
Jimmy Tao
Thank you. I will have to do this every month.
I think the solution will be to upload the new file, do some changes, and then append.
Giora