Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

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
Resident Rockstar
Resident Rockstar

Hi @Anonymous 

 

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
Resident Rockstar
Resident Rockstar

Hi @Anonymous 

 

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

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.