自定义函数
自定义函数:
(参数1,参数2,参数3……) => 函数运算表达式
※通过调用函数得到的函数返回值称为函数值
例:
(parameter1 as number, parameter2 as number) =>
let
Final = (parameter1 + parameter2) / 2
in
Final
If表达式
if表达式通过对逻辑条件进行判断来对两个表达式进行选择。
例:
if 2 > 1 then
2 + 2
else if 2 = 1 then
2 + 1
else
1 + 1
创建表格
let
源 = #table(
{"订单id","客户id","订单金额"},
{
{"a","aa",100},
{"b","bb",200},
{"c","bb",300}
}
)
in
源
let
源 = #table(
{"客户id","客户名称"},
{
{"aa","赵大"},
{"bb","王二"}
}
)
in
源
let
源 = [
订单id = "b",
客户id = "bb",
订单金额 = 200,
客户表 = #table(
{"客户id","客户名称"},
{
{"bb","王二"}
}
)
]
in
源
暂无数据