Forum Discussion
MathieuF
3 years agoHelper III
Find the previous action
Hello, In power bi, I would like a column calculated in dax which puts a 1 on the last action which precedes the auto-close action of the same ID. The table is called Journal, the time column is ti...
FreemanZ
3 years agoSuper User
hi MathieuF
try to add a calculated column like:
Column =
VAR _LastTime=
MAXX(
FILTER(
data,
data[name]=EARLIER(data[name])
&&data[action]<>"auto-close"
),
data[time]
)
RETURN
IF(
[Time]=_LastTime,
1
)it worked like: