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
TIGER8855
Helper I
Helper I

Extract dates from separate tables

I need to create a new column in my data showing the due date for items however some of my items have a due date where the value of the due date is in a seperate table. In the original table there is no date and instead an identifier is shown and the other table shows the value (Date) of that identifier.

 

Below is a sample of the data. Can anyone advise on the formula required to create a new column in Table A with all the due dates?

 

Table A

ItemSerial NumberInstance
1A-00418/10/2024
2A-00625/02/2026
3A-001A
4A-002A
5A-001B
6A-001A
7A-002B
8A-002A
9A-002B

 

Table B

Serial NumberInstanceDate
A-001A31/01/2024
A-001B31/01/2025
A-001C31/01/2026
A-002A15/06/2024
A-002B20/08/2025
A-002C

31/01/2026

 

1 ACCEPTED SOLUTION
Ashish_Mathur
Super User
Super User

Hi,

Write this calculated column formula in Table1

Column = CALCULATE(MAX(Table2[Date]),FILTER(Table2,Table2[Serial Number]=EARLIER(Table1[Serial Number])&&Table2[Instance]=EARLIER(Table1[Instance])))

Hope this helps.

Untitled.png


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

3 REPLIES 3
Ashish_Mathur
Super User
Super User

Hi,

Write this calculated column formula in Table1

Column = CALCULATE(MAX(Table2[Date]),FILTER(Table2,Table2[Serial Number]=EARLIER(Table1[Serial Number])&&Table2[Instance]=EARLIER(Table1[Instance])))

Hope this helps.

Untitled.png


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Thank you! That worked.

You are welcome.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

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.

Top Solution Authors