热线电话:13121318867

登录
2020-06-08 阅读量: 1201
power BI 用自定义函数与判断语句,创建由三个参数构成的自定义函数,自定义函数用来选择做四则 运算中的哪种运算,并返回计算结果

前两个参数用来参与四则运算,第三个参数用来判断做哪种类型的计算

例:当第三个参数为1是做加法,为2时做减法,为3时做乘法,为4时做除法运算。除此之外

的参数值时返回“参数错误”提示

(a as number,b as number,salcal as number)=>

let

源 =if salcal=1 then a+b

else if salcal=2 then a-b

else if salcal=3 then a*b

else if salcal=4 then a/b

else "参数错误 "

in

13.8551
0
关注作者
收藏
评论(0)

发表评论

暂无数据
推荐帖子