cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Rick_ferreira
Helper III
Helper III

Create column with actual status

Hi everyone

I have a problem and I can not solve it.
I have a table like this:

Rick_ferreira_0-1623416227949.png

I need to build a column calculated with the actual status, like this:

Rick_ferreira_1-1623416275226.png

I am trying but probably I am doing something wrong.

Does someone help me?

1 ACCEPTED SOLUTION
Vera_33
Super User
Super User

Hi @Rick_ferreira 

 

You want a Column in DAX or M? It's one in DAX

Vera_33_0-1623418608781.png

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])

View solution in original post

1 REPLY 1
Vera_33
Super User
Super User

Hi @Rick_ferreira 

 

You want a Column in DAX or M? It's one in DAX

Vera_33_0-1623418608781.png

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])

View solution in original post

Helpful resources

Announcements
PBI_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Teds Dev Camp Oct. 2021 768x460.jpg

Power BI Dev Camp - October 28th, 2021

Mark your calendars and join us for our next Power BI Dev Camp!