培训
Text.Start
Text.Start(text as nullable text, count as number) as nullable text
返回 text
的前 count
个字符作为文本值。
获取“Hello, World”的前 5 个字符。
使用情况
Text.Start("Hello, World", 5)
输出
"Hello"
使用名字的前四个字符和姓氏的前三个字符创建个人的电子邮件地址。
使用情况
let
Source = #table(type table [First Name = text, Last Name = text],
{
{"Douglas", "Elis"},
{"Ana", "Jorayew"},
{"Rada", "Mihaylova"}
}),
EmailAddress = Table.AddColumn(
Source,
"Email Address",
each Text.Combine({
Text.Start([First Name], 4),
Text.Start([Last Name], 3),
"@contoso.com"
})
)
in
EmailAddress
输出
#table(type table [First Name = text, Last Name = text, Email Address = text],
{
{"Douglas", "Elis", "DougEli@contoso.com"},
{"Ana", "Jorayew", "AnaJor@contoso.com"},
{"Rada", "Mihaylova", "RadaMih@contoso.com"}
})