Forum Discussion

bilingual's avatar
bilingual
Icon for Helper V rankHelper V
5 years ago
Solved

First/MIN date Value from One to many relation

Hi, i have to data tables:

 

1: With Unique IDs

 

2. With Multiple IDs and dates

 

I need in Table 1 , the Min first date/the MIN Date value of the date for each corresponding unique value, i have tried with MIN to no avail, can anybody help ?

 

 

  • bilingual , New columns in Table 1

     

    if they are related 

    col1 = minx(relatedtable(table2), table2[dates])

    col2 = maxx(relatedtable(table2), table2[dates])

     

    If they are not related

     

    col1 = minx(filter(table2, Table1[ID] = Table2[ID]), table2[dates])

    col2 = maxx(filter(table2, Table1[ID] = Table2[ID]), table2[dates])

1 Reply

  • bilingual , New columns in Table 1

     

    if they are related 

    col1 = minx(relatedtable(table2), table2[dates])

    col2 = maxx(relatedtable(table2), table2[dates])

     

    If they are not related

     

    col1 = minx(filter(table2, Table1[ID] = Table2[ID]), table2[dates])

    col2 = maxx(filter(table2, Table1[ID] = Table2[ID]), table2[dates])