如何使用ifelse在AWS QuickSight中编写计算的字段公式

我正在尝试编写一个公式,该公式将根据日期计算折扣成本。

2019年5月之后产生的任何费用的折现率均为7%,而此之前的任何折扣率为6%。

这是我的公式,但表示语法不正确。任何帮助将不胜感激。

ifelse(month >= 5 AND year >= 2019),then {unblended_cost} - ({unblended_cost} * 0.07),else {unblended_cost} - ({unblended_cost} * 0.06))
lililinlin23 回答:如何使用ifelse在AWS QuickSight中编写计算的字段公式

尝试以下操作,如果遇到其他错误,请告诉我

ifelse(                                                                         
  month >= 5 AND year >= 2019,{unblended_cost} - ({unblended_cost} * 0.07),{unblended_cost} - ({unblended_cost} * 0.06)                                  
) 

本质上,ifelse可以被视为一个函数,而thenelse关键字是多余的。

本文链接:https://www.f2er.com/3156693.html

大家都在问