如果电源查询中的语句
我有一个简单的IF Power查询语句,我觉得我需要单独的眼睛。
我想说的是,如果本周的当天是星期一,那么我希望该系统在3天前显示任何日期,否则任何其他一天都会显示昨天的日期。我下面的公式正在收到“令牌右par的预期”错误。在第二行的“然后”之后的“日期”。
if(Date.DayOfWeek(DateTime.FixedLocalNow()) = 0 then
Date.AddDays(Date.From(DateTime.FixedLocalNow()),-3) else
Date.AddDays(Date.From(DateTime.FixedLocalNow()),-1))
I have a simple if Statement in Power Query I feel I need a separate set of eyes on.
I am trying to say if the current day of the week is Monday then I want the system to display whatever the date was 3 days ago, else any other day just show yesterdays date. My formula below is receiving the error "Token RightParen expected." at the "Date" after "then" on the 2nd line.
if(Date.DayOfWeek(DateTime.FixedLocalNow()) = 0 then
Date.AddDays(Date.From(DateTime.FixedLocalNow()),-3) else
Date.AddDays(Date.From(DateTime.FixedLocalNow()),-1))
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
一些额外的字符。删除第一个和最后一个括号
A few extra characters. Remove first and last parenthesis