拆分行(Power Query 之 M 语言)

数据源:

  略

目标:

  将指定列拆分为行

操作过程:

  选取指定列》【主页】(或【转换】)》【拆分列】》【按分隔符】/【按字符数】/【按位置】》高级选项》拆分为【行】

M公式:

= Table.ExpandListColumn(Table.TransformColumns(步骤名, {"列名", 拆分函数}), "列名")  

= Table.ExpandListColumn(Table.TransformColumns(步骤名, {"列名", 拆分函数 let itemType = (type nullable text) meta [Serialized.Text = true] in type {itemType}}), "列名")

说明:

  拆分函数详见:

https://www.cnblogs.com/officeplayer/p/14285666.html

https://www.cnblogs.com/officeplayer/p/14192706.html

https://www.cnblogs.com/officeplayer/p/14093054.html

https://www.cnblogs.com/officeplayer/p/14092993.html

https://www.cnblogs.com/officeplayer/p/14456280.html

  拆分函数亦可单独自定义

最终效果:

  略

原博客各种作……所以换阵地了,不过每篇都搬过来,实在有点累,想看就自己看吧:http://blog.sina.com.cn/pureiceshadow
原文地址:https://www.cnblogs.com/officeplayer/p/14400265.html