Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.