如下数据,要将[名称] 拆分成[名称1] [数字1] [数字2] [数字3]
如下数据,要将[名称] 拆分成[名称1] [数字1] [数字2] [数字3]
Table.AddColumn(源, "自定义", each Table.FromList({Text.End([列1],Text.Length([列1])-Text.Length(Text.TrimEnd([列1],{"0".."9"})))},(x)=>Text.ToList(x),{"数字1","数字2"}){0}&[数字3=[A=Text.BetweenDelimiters([列1],"[","]"),B=if A="" then A else "["&A&"]"][B]])
Table.AddColumn(源, "自定义", each Table.FromList({Text.End([列1],Text.Length([列1])-Text.Length(Text.TrimEnd([列1],{"0".."9"})))},(x)=>Text.ToList(x),{"数字1","数字2"}){0}&[数字3=[A=Text.BetweenDelimiters([列1],"[","]"),B=if A="" then A else "["&A&"]"][B]])
let
源 = Excel.CurrentWorkbook(){[Name="表4"]}[Content],
已添加自定义 =
Table.AddColumn(源, "自定义", each
[名称1=Text.TrimEnd([列1],{"1".."9","[","]"}),
数字=Text.ToList(if Text.Contains([列1],"]") then Text.AfterDelimiter([列1],"]" ) else Text.Replace([列1],名称1,"")),
数字1=Number.From(数字{0}?),
数字2=Number.From(数字{1}?),
数字3= [A=Text.BetweenDelimiters([列1],"[","]"),B=if A="" then null else "["&A&"]"][B]]
),
"展开的“自定义”" = Table.ExpandRecordColumn(已添加自定义, "自定义", {"名称1", "数字1", "数字2", "数字3"}, {"名称1", "数字1", "数字2", "数字3"})
in
"展开的“自定义”"
不会传图片~~~
一群牛人,终于找到组织了
@Ntt docomo
还有些问题,表中还有其他列,只有名称1、名称2两列需要拆分,再请教一下
@Ntt docomo
如第二张图片
你再添加一列呗