Forum Discussion
MathieuF
Helper III
3 years agoFind 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...
Anonymous
3 years agoNot applicable
Hi MathieuF ,
Please try,
Auto-close =
VAR _close_time = CALCULATE(MAX('Table'[Time]),'Table'[action]="auto-close",ALLEXCEPT('Table','Table'[ID]))
VAR _result =IF('Table'[Time]=CALCULATE(MAX('Table'[Time]),'Table'[Time]<_close_time),1)
RETURN
_result
Best Regards,
Gao
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data in the Power BI Forum