IF语句比较同一列中的日期



我有如下sql查询:(只放入骨架(

select 
e1.empname,
case
when e1.date in {"20201001","20200102"} 
and e2.date not in {"20200101","20200102","20200103"} then "entry"
when v1.date > v2.date  then "exit"
when v1.date < v2.date then "detsined"
else "promoted"
end as "As usual"
from employee v1, employee v2
where v1.quarter= "2015 Q3" 

我正在尝试写一个等效的dax度量。IF(table[datestring]>table[datestring](这不起作用。我理解我们需要在这里使用自联接概念。有人能帮我吗?

该功能在power bi 上不可用

最新更新