Forum Discussion

WilliamAzevedo's avatar
WilliamAzevedo
Advocate II
1 year ago
Solved

Status column based on another table

Hello, everyone.   I manage projects through a table and it's Statuses through a proper table with that goal. Example:   Statuses Status Project Date Canceled P3 12/01/2024 Complete...
  • Jihwan_Kim's avatar
    1 year ago

    Hi,

    Please check the below picture and the attached pbix file.

     

     

     

     

     

    Status CC =
    VAR _currentproject = Projects[Project]
    VAR _latestdate =
        MAXX ( RELATEDTABLE ( Statuses ), Statuses[Date] )
    RETURN
        CALCULATE (
            MAX ( Statuses[Status] ),
            Statuses[Date] = _latestdate,
            Statuses[Project] = _currentproject
        )