数据源:
任意表,表中列数超过两列
目标:
其中两列合并为一列
操作过程:
选取两列》【转换】》【合并列】》选取或输入分隔符》输入新列名》【确定】
M公式:
= Table.CombineColumns( 表,{"合并列1", "合列列2",...,"合并列n"}, 合并函数,"新列名")
最终效果:
如图
扩展:
文本合并:= Text.Combine({"字符串1","字符串2",...,"字符串n"},"分隔符")
示例:= Text.Combine({"A","B"},"-")
结果:A-B
任意合并:&
= [列1] & [列2] &,...,&[列n]
= "字符串1" & "字符串2" &,...,& "字符串n"