Forum Discussion

Machzy's avatar
Machzy
Helper I
9 years ago
Solved

Joining multiple tables/queries

Hi,   I'm new to Power BI (currently going through the videos on edX). I have a long background with Crystal Reports and now trying to slowly convert that knowledge into PBI.   One of the things ...
  • Phil_Seamark's avatar
    Phil_Seamark
    9 years ago

    This will be the reason for the error.

     

    One option is to create a new column that combine your CompanyID/CustomerID into a single column, which you can do in the Query Editor.  This would need to be done in both tables to create the relationship.

     

    Otherwise, you could combine both tables into 1 in Query Editor using the Merge command to create a table with the following columns

     

    CompanyID , CustomerID , CustomerName , InvoiceNum

     

    Cheers,

     

    Phil

     

     

  • Peter_R's avatar
    Peter_R
    9 years ago

    I think you're actually better off using that first suggestion - keep the two separate tables, but create concatenated key columns in both tables that combine the CompanyID and CustomerID columns, using these new columns to join the tables. This allows you to treat the customer table as a lookup table. As you start learning more about PowerBI, you'll see that this is the standard modelling approach.