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...
MathieuF
2 years agoHelper III
Good morning,
With the formula below, how to display only one 1; the one just after the auto-close?
Can anyone help me?
`Auto-close2 =
VAR _close_time = CALCULATE(MAX('journal'[created_at]),'journal'[action]="auto-close",ALLEXCEPT('journal','journal'[task_id]))
VAR _result =IF('journal'[created_at]=CALCULATE(MAX('journal'[created_at]),'journal'[created_at]<_close_time,ALLEXCEPT('journal','journal'[task_id])),1)
RETURN
_result`
Thanks in advance.
Anonymous