Forum Discussion

clarainesgg's avatar
clarainesgg
Helper I
1 year ago

Error merge Inner

Hi,

 

I am merging to tables (inner) with Clients_ID (text). I got a message

 

 

 

I filter teh nulls and blanks.

 

Please, do you know why?

 

Thank you,

 

Clara

2 Replies

  • 1. Null Values in Key Columns:

    Even though you've filtered out null and blank values, there might still be rows where Clients_ID contains a null after filtering. Ensure that both tables you're merging are completely free of null values in the Clients_ID column by explicitly checking.

    Solution: Double-check the Clients_ID column in both tables for null values after filtering. Use a conditional column or an additional filter step:

    • In Power Query, use the Remove Empty option to remove any rows where Clients_ID is blank or null:
      • Select the Clients_ID column.
      • Click on Remove Rows -> Remove Blank Rows.

    2. Data Type Mismatch:

    Sometimes, the issue could be caused by mismatched data types. If Clients_ID is stored as a text column in one table and a different data type (like number or logical) in the other table, Power BI may have trouble merging them.

    Solution: Ensure that both Clients_ID columns in the two tables have the same data type (preferably Text if you're dealing with ID fields). In Power Query, explicitly convert the data type:

    • Select the Clients_ID column in both tables.
    • Go to the Transform tab and choose Data Type -> Text.

    3. Check Merge Logic:

    The error could also be triggered if Power BI is trying to apply a logical operation (like a conditional join) where one of the values is null.

    Solution: Ensure that your join condition in the merge step does not involve null values or any logic that expects a TRUE/FALSE outcome where null is present.

    4. Check All Merge Conditions:

    If your merge involves more than just the Clients_ID column, check if any other column in the merge step contains null values or has incompatible data types.

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi clarainesgg 

     

    Did Shravan133  's method solve your problem? If yes, could you please mark it as a solution? This will be of great help to other users experiencing similar problems. Thank you!

     

    If you still have questions, please feel free to ask me.

     

    Best Regards,
    Yulia Xu