Forum Discussion
Multiple IF conditions different tables
- 3 years ago
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: [email protected]
Service: http://www.inogic.com/services/
Power Platform/Dynamics 365 CRM Tips and Tricks: http://www.inogic.com/blog/
Hi Anonymous
Any relationship between the two table?
- Anonymous3 years agoNot applicable
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.