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
bilingual
Helper V
Helper V

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 ?

 

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@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])

View solution in original post

1 REPLY 1
amitchandak
Super User
Super User

@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])

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.