Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

Multiple IF conditions different tables

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...
  • SamInogic's avatar
    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/