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
dude95
Resolver I
Resolver I

Join tables - Get a column from the most recent date in a colum (Project, Project Status tables)

Seems like this shouldn't be that hard, but I'm struggling.  I have two tables

 

Project Table

Project ID
0000001
0000002

 

ProjectStatus Table

Project IDStatus DateTeamStatusInd
000000112/19/20PMORed
000000112/12/20PMOGreen

 

There are several reports I would like to show the latest(most recent) statusInd for a Project hardcoded to PMO team.  In the example, want to show Project 000001 = Red.

 

Should this just be a measure or Dax?  What would the formulat look like.  Been searching, but haven't gotten exactly what I need.  TIA.

1 ACCEPTED SOLUTION
Fowmy
Super User
Super User

@dude95 

Create a table visual and insert the Project ID from Project Table and create the following measure

Measure = 
var _Date = 
MAXX(
    FILTER(
        Proejctstatus,
        Proejctstatus[project id] = SELECTEDVALUE(Project Table[Project ID])
    ),
    Proejctstatus[Status Date]
) 

var _Status = 
MAXX(
    FILTER(
        Proejctstatus,
        Proejctstatus[project id] = SELECTEDVALUE(Project Table[Project ID]) && Proejctstatus[Status Date] = _Date 
    ),
    Proejctstatus[StatusInd]
) 

return
_Status 

________________________

If my answer was helpful, please click Accept it as the solution to help other members find it useful

Click on the Thumbs-Up icon if you like this reply 🙂


Website YouTube  LinkedIn

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

View solution in original post

2 REPLIES 2
dude95
Resolver I
Resolver I

This was perfect - I just added this to the end so that all projects would still be displayed even if they didn't have a PMO status report submitted yet.  Thanks for a great solution!

var _AllStatus = 
concatenate(_Status, "")
return
_AllStatus

 

Fowmy
Super User
Super User

@dude95 

Create a table visual and insert the Project ID from Project Table and create the following measure

Measure = 
var _Date = 
MAXX(
    FILTER(
        Proejctstatus,
        Proejctstatus[project id] = SELECTEDVALUE(Project Table[Project ID])
    ),
    Proejctstatus[Status Date]
) 

var _Status = 
MAXX(
    FILTER(
        Proejctstatus,
        Proejctstatus[project id] = SELECTEDVALUE(Project Table[Project ID]) && Proejctstatus[Status Date] = _Date 
    ),
    Proejctstatus[StatusInd]
) 

return
_Status 

________________________

If my answer was helpful, please click Accept it as the solution to help other members find it useful

Click on the Thumbs-Up icon if you like this reply 🙂


Website YouTube  LinkedIn

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

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.