Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Join two tables

Im trying to left join the two tables below: Left table ('SN CMDB Prod DW') and Right table ('SN Bundle Prod DW') with a left outer join in order to keep all my records from the left and see whateve...
  • DataInsights's avatar
    DataInsights
    4 years ago

    Anonymous,

     

    Try this. The column data type is Text.

     

    CMDB&Bundle = 
    VAR A =
        SELECTCOLUMNS (
            'SN Inventory (Bundle Prod DW)',
            "Remove Last 5", 'SN Inventory (Bundle Prod DW)'[Remove Last 5] & ""
        )
    VAR B =
        SELECTCOLUMNS (
            'SN Inventory (CMDB Prod DW)',
            "Remove Last 5", 'SN Inventory (CMDB Prod DW)'[Remove Last 5] & ""
        )
    VAR Result =
        NATURALLEFTOUTERJOIN ( A, B )
    RETURN
        Result

     

    Additional reading:

     

    https://www.sqlbi.com/articles/from-sql-to-dax-joining-tables/