Forum Discussion
Search then pull column data into another table
- 1 year ago
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:
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. - 1 year ago
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())
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.