Forum Discussion

nhoff's avatar
nhoff
Icon for Advocate I rankAdvocate I
9 years ago
Solved

Lookup Min/Max values from related table

I have two tables: Planning and Tasks. Please see simplified representation in inserted screenshot.

I want to have the earliest start date and latest end date for each name in table Planning based on the task information in related table Tasks.

 

  • If your tables have a many-to-one relationship between Planning and Tasks, the in your Planning table you should be able to create two columns like:

     

    Start for name = CALCULATE(MAX(Tasks[Date]),FILTER(Tasks,[Tasks]=[Project]))

    If it is many-to-many, you will need a bridge table that has each task entered only once.

1 Reply

  • Greg_Deckler's avatar
    Greg_Deckler
    Icon for Community Champion rankCommunity Champion

    If your tables have a many-to-one relationship between Planning and Tasks, the in your Planning table you should be able to create two columns like:

     

    Start for name = CALCULATE(MAX(Tasks[Date]),FILTER(Tasks,[Tasks]=[Project]))

    If it is many-to-many, you will need a bridge table that has each task entered only once.