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
Anonymous
Not applicable

Related One to Many - Pulling a Date

Dear Team,

 

I am thinking about this wrong so I am looking for some help. My goal is to create a calculated column on the Project Table that pulls in the date the Call was completed.

Project Table
IDNameCall Completion Date
1Project 110/5/2020
2Project 21/20/2020
3Project 34/1/2020

 

Task Table
ID NameCompletion Date
1Call10/5/2020
1Build10/6/2020
1Email10/7/2020
2Call1/20/2020
2Build1/21/2020
2Email1/22/2020
3Call4/1/2020
3Build4/2/2020
3Email4/3/2020

 

The column I want to create is in Red. It is a one to many relationships between the tables. I was thinking something along the lines of lookup value?

 

Interested to see other solutions!

 

Best,

1 ACCEPTED SOLUTION
camargos88
Community Champion
Community Champion

Hi @Anonymous ,

 

Try this code for a calculated column:

 

Call Completion Date =
VAR _id = 'Project Table'[ID]
RETURN CALCULATE(MAX('Task Table'[Completion Date]); FILTER(ALL('Task Table'); 'Task Table'[ID ] = _id && 'Task Table'[Name] = "Call"))
 
Ricardo


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!



View solution in original post

2 REPLIES 2
camargos88
Community Champion
Community Champion

Hi @Anonymous ,

 

Try this code for a calculated column:

 

Call Completion Date =
VAR _id = 'Project Table'[ID]
RETURN CALCULATE(MAX('Task Table'[Completion Date]); FILTER(ALL('Task Table'); 'Task Table'[ID ] = _id && 'Task Table'[Name] = "Call"))
 
Ricardo


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!



Anonymous
Not applicable

Thank you Ricardo!

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.