Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi,
I have problem with DAX. I need to combine data between two tables if some criteria is met.
Tables;
PriceTable, Contains prices, customer IDs, product IDs and dates
Receided goods table, Contains data about received goods, quantity, customer ID, productID and dates
So I have to get both received goods and the price to the same table when
Price table customer ID = Received goods table Customer ID
Price table product ID = Received goods table Product ID
Price table Date = Received goods table Date
Is there anyone who might have idea how to combine those data?
Solved! Go to Solution.
Power BI provides a feature of combining the data from two tables based on columns with the same values.
In your requirement, it seems that you have two tables “Price Table”, and “Received Goods” and want to combine these tables using CustomerID, ProductID, and Date columns from both tables.
So in order to combine both tables using these 3 column values, you can follow the below steps and combine the tables to create a new table with common values.
1. Navigate to Power Query Editor and click on the Transform tab which has the option for Combine>> Merge Queries>> Merge Queries as New.
2. This will open the Merge dialog and select the columns required to have same values i.e. in these case select Customer ID, Product ID and Date (PriceTable)/ Received goods Date (Received goods) table. Select the Join Kind as Inner join as we want only matching rows to be filtered out in new table.
3. This will create a new table with rows matching for both table based on selected columns.
Please refer to the below screenshot for the same.
Output for the merging tables will be as follows:
If this answer helps, please mark it as Accepted Solution so it would help others to find the solution.
Thanks!
Inogic Professional Services
An expert technical extension for your techno-functional business needs
Power Platform/Dynamics 365 CRM
Drop an email: crm@inogic.com
Service: http://www.inogic.com/services/
Power Platform/Dynamics 365 CRM Tips and Tricks: http://www.inogic.com/blog/
Power BI provides a feature of combining the data from two tables based on columns with the same values.
In your requirement, it seems that you have two tables “Price Table”, and “Received Goods” and want to combine these tables using CustomerID, ProductID, and Date columns from both tables.
So in order to combine both tables using these 3 column values, you can follow the below steps and combine the tables to create a new table with common values.
1. Navigate to Power Query Editor and click on the Transform tab which has the option for Combine>> Merge Queries>> Merge Queries as New.
2. This will open the Merge dialog and select the columns required to have same values i.e. in these case select Customer ID, Product ID and Date (PriceTable)/ Received goods Date (Received goods) table. Select the Join Kind as Inner join as we want only matching rows to be filtered out in new table.
3. This will create a new table with rows matching for both table based on selected columns.
Please refer to the below screenshot for the same.
Output for the merging tables will be as follows:
If this answer helps, please mark it as Accepted Solution so it would help others to find the solution.
Thanks!
Inogic Professional Services
An expert technical extension for your techno-functional business needs
Power Platform/Dynamics 365 CRM
Drop an email: crm@inogic.com
Service: http://www.inogic.com/services/
Power Platform/Dynamics 365 CRM Tips and Tricks: http://www.inogic.com/blog/
Hi and first of all thanks for answering.
I actually managed to come out with the identical solution and I can say that it works well.
Hi @Anonymous
Any relationship between the two table?
Hi,
Not at the moment, as I have tried to figure out the best way to merge those queries.
I have tried to do a new key between the tables by using CustomerID+ProductID+FirstDayOfTheMonth. Doing it to both queries and merge queries by those keys.
I also found a slight problem with our data so I will update here if my solution will work after I have fixed the data.
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
26 | |
10 | |
10 | |
9 | |
6 |