cancel
Showing results for 
Search instead for 
Did you mean: 
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
T-Shirt Design Challenge 2023

Power BI T-Shirt Design Challenge 2023

Submit your creative T-shirt design ideas starting March 7 through March 21, 2023.

March 2023 Update3

Power BI March 2023 Update

Find out more about the March 2023 update.

March Events 2023A

March 2023 Events

Find out more about the online and in person events happening in March!

Top Solution Authors