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

View all the Fabric Data Days sessions on demand. View schedule

Reply
Earl40
Helper I
Helper I

Search then pull column data into another table

Hi I need some help, please let me know if i need to clarify my reuqest. Thank you im advamce I have 2 data sources connected. I have table A, and I want to bring in Order Date and source info from table B into tabke A but ONLY for items in Category columumn A and B ONLY if the  values Order ID # Category Create Date match the same in table B

 

Table A

ID #CategoryCreate Date
1xA5/20/2025
2xB5/21/2025
3xB5/22/2025
4xA5/23/2025
5xA5/24/2025
6xC5/25/2025
7xC5/26/2025

 

Table B

ID #Order #CategoryCreate DateOrder DateSource
1x A5/20/20254/20/2025Paper
2x B5/21/20254/21/2025Paper
3x B5/22/20254/22/2025Paper
4x A5/23/20254/23/2025Email
5x A5/24/20254/24/2025Email
6x C5/25/20254/25/2025Email
7x C5/26/20254/26/2025Email
2 ACCEPTED SOLUTIONS
v-ssriganesh
Community Support
Community Support

Hello @Earl40,
Thank you for reaching out to the Microsoft Fabric Community Forum.

I have reproduced your scenario in Power BI Desktop based on the details you shared and I got the expected result as per your requirements.

You wanted to bring in Order Date and Source from Table B into Table A, only if:

  • ID #, Category, and Create Date match between both tables
  • AND the Category is either A or B

What I Did Practically in Power BI:

  • Filtered Table A to include only Category A and B
  • Performed a Merge (Inner Join) between Table A and Table B using three matching fields: ID #, Category, and Create Date
  • Expanded the required columns (Order Date and Source) from Table B into Table A

Expected Output:

vssriganesh_0-1753680703340.png
For your reference, I’ve attached the .pbix file that demonstrates the solution using your sample data. Please feel free to download and explore it to apply the same logic in your model.

Best Regards,
Ganesh Singamshetty.

View solution in original post

Hi,

Try this measure

=if(TableA[Category]="A"||TableA[Category]="B",CALCULATE(MAX(TableB[Order Date]),FILTER(TableB,TableB[Category]=EARLIER(TableA[Category])&&TableB[ID]=EARLIER(TableA[ID]))),BLANK())

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

View solution in original post

9 REPLIES 9
v-ssriganesh
Community Support
Community Support

Hello @Earl40

Could you please confirm if your query has been resolved by the provided solutions? This would be helpful for other members who may encounter similar issues.

 

Thank you for being part of the Microsoft Fabric Community.

v-ssriganesh
Community Support
Community Support

Hello @Earl40,

Hope everything’s going great with you. Just checking in has the issue been resolved or are you still running into problems? Sharing an update can really help others facing the same thing.

Thank you.

v-ssriganesh
Community Support
Community Support

Hello @Earl40,

We hope you're doing well. Could you please confirm whether your issue has been resolved or if you're still facing challenges? Your update will be valuable to the community and may assist others with similar concerns.

Thank you.

v-ssriganesh
Community Support
Community Support

Hello @Earl40,
Thank you for reaching out to the Microsoft Fabric Community Forum.

I have reproduced your scenario in Power BI Desktop based on the details you shared and I got the expected result as per your requirements.

You wanted to bring in Order Date and Source from Table B into Table A, only if:

  • ID #, Category, and Create Date match between both tables
  • AND the Category is either A or B

What I Did Practically in Power BI:

  • Filtered Table A to include only Category A and B
  • Performed a Merge (Inner Join) between Table A and Table B using three matching fields: ID #, Category, and Create Date
  • Expanded the required columns (Order Date and Source) from Table B into Table A

Expected Output:

vssriganesh_0-1753680703340.png
For your reference, I’ve attached the .pbix file that demonstrates the solution using your sample data. Please feel free to download and explore it to apply the same logic in your model.

Best Regards,
Ganesh Singamshetty.

Ashish_Mathur
Super User
Super User

Hi,

Write this calculated column formula in TableA

=if(TableA[Category]="A"||TableA[Category]="B",CALCULATE(MAX(TableB[Order Date]),FILTER(TableB,TableB[Category]=EARLIER(TableA[Category])&&TableB[Create Date]=EARLIER(TableA[Create Date]))),BLANK())

Hope this helps.

Ashish_Mathur_0-1753671339516.png

 


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

@Ashish_Mathur Thank you. I tried the formula and all values came out blank. it turns out I have a data mismatch in the date columns that wont be resolved. If I want to alter the formula to  just want to match the Category and ID numbers, how would that be done? thank you in advance

Hi,

Try this measure

=if(TableA[Category]="A"||TableA[Category]="B",CALCULATE(MAX(TableB[Order Date]),FILTER(TableB,TableB[Category]=EARLIER(TableA[Category])&&TableB[ID]=EARLIER(TableA[ID]))),BLANK())

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

@Earl40 

 

@Jihwan_Kim 's solution will do the magic if you want to get matched value of category and ID between two table.

 

Thank you.

Jihwan_Kim
Super User
Super User

Hi,

I am not sure if I understood your question correctly, but please check the below picture and the attached pbix file if it suits your requirement. It is for creating a calculated table for each information from Table B.

 

Jihwan_Kim_0-1753670644107.png

 

Jihwan_Kim_1-1753670799409.png

 

CC Order date from Table B = 
SUMMARIZE (
    FILTER (
        'Table B',
        'Table B'[ID #] = 'Table A'[ID #]
            && 'Table B'[Category] = 'Table A'[Category]
    ),
    'Table B'[Order Date]
)

 

CC Source from Table B = 
SUMMARIZE (
    FILTER (
        'Table B',
        'Table B'[ID #] = 'Table A'[ID #]
            && 'Table B'[Category] = 'Table A'[Category]
    ),
    'Table B'[Source]
)

 

 


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors