Forum Discussion
Anonymous
5 years agoNot applicable
Create column with actual status
Hi everyone
I have a problem and I can not solve it.
I have a table like this:
I need to build a column calculated with the actual status, like this:
I am trying but probably I am doing something wrong.
Does someone help me?
- Anonymous5 years ago
Hi Anonymous
You want a Column in DAX or M? It's one in DAX
Actual = VAR CurP = yourTable[Product] VAR MaxDate = MAXX(FILTER(yourTable,yourTable[Product]=CurP),[Date]) RETURN MAXX(FILTER(ALLEXCEPT(yourTable,yourTable[Product]),yourTable[Date]=MaxDate),yourTable[Status])
1 Reply
- AnonymousNot applicable
Hi Anonymous
You want a Column in DAX or M? It's one in DAX
Actual = VAR CurP = yourTable[Product] VAR MaxDate = MAXX(FILTER(yourTable,yourTable[Product]=CurP),[Date]) RETURN MAXX(FILTER(ALLEXCEPT(yourTable,yourTable[Product]),yourTable[Date]=MaxDate),yourTable[Status])