Forum Discussion

SamWhitehouse's avatar
SamWhitehouse
Frequent Visitor
6 years ago
Solved

Return Earliest Date

Hi All,      I have 2 tables. a Projects table showing a summary of the project and a task table showing a list of all tasks on for each project.    Project Name Project Manager Project Sta...
  • Anonymous's avatar
    Anonymous
    6 years ago

    Hi

    Can you try to add a calculated column on the first table with the following code:

    Add a calculated column on table2
    Latest Milestone =
    VAR Current_Project = Table2[Project Name]
    return CALCULATE(MAX(Table1[Milestone]), FILTER(Table1, Table1[Project Name] = Current_Project))

    table2

    Project NameProject ManagerProject Start DateProject Finish DateLatest Milestone

    table1

    Project NameTaskMilestone

     

    hope this helps

    It came from the following post:

    https://community.powerbi.com/t5/Desktop/DAX-LOOKUPVALUE-with-MAX/td-p/696076

     

    Thank you

    Tomas