Forum Discussion
DAX Create column LAST status based on MAX date
- 8 years ago
Hi jkaufman,
To achieve your requirement, create two calculate column using DAX as below:
Max Status Date = CALCULATE(MAX(Table1[Status Date]), ALLEXCEPT(Table1, Table1[ID])) Result = CALCULATE(MAX(Table1[Status]), FILTER(ALLEXCEPT(Table1, Table1[ID]), Table1[Status Date] = Table1[Max Status Date]))
Regards,
Jimmy Tao
Hi jkaufman,
To achieve your requirement, create two calculate column using DAX as below:
Max Status Date = CALCULATE(MAX(Table1[Status Date]), ALLEXCEPT(Table1, Table1[ID])) Result = CALCULATE(MAX(Table1[Status]), FILTER(ALLEXCEPT(Table1, Table1[ID]), Table1[Status Date] = Table1[Max Status Date]))
Regards,
Jimmy Tao
- Anonymous6 years agoNot applicable
I faced a similar problem, but the solution failed with the external filter. This Doesn’t work when we apply an external or explicit filter on a Status date.
- sophy4 years agoRegular Visitor
Thanks for your solution! Please help count people by the last status.
- Ashish_Mathur4 years agoSuper User
Hi,
Share some data, explain the question and show the expected result.
- Anonymous3 years agoNot applicable
I've been wracking my brain trying to figure out how to do this!! Thank you so much for your solution!
My code is pretty similar to yours, except I didn't use the Filter(AllExcept) function. I just used the following code. May I ask what does the Filter(AllExcept) does for this code, and why wouldn't it work without it?
Again, thank you so much.CALCULATE(MAX(Table1[Status]), Table1[Status Date] = Table1[Max Status Date])