Forum Discussion

SBC's avatar
SBC
Helper III
3 years ago
Solved

Compare columns based on two different table

Hi, How to compare columns in two different table ,I have tried with  full outer join but not working as expected. Please check sample data   provided below input of two tables and output expected....
  • AntrikshSharma's avatar
    3 years ago

    SBC Do this in PowerQuery and use 2 columns as a key when merging queries.

     

    let
        Source = Table.NestedJoin (
            T1,
            { "member  ", "deal  " },
            T2,
            { "member   ", "Deal " },
            "T2",
            JoinKind.FullOuter
        ),
        ExpandedT2 = Table.ExpandTableColumn (
            Source,
            "T2",
            { "member   ", "Deal ", "Qty", "Date" },
            { "member   ", "Deal ", "Qty.1", "Date.1" }
        )
    in
        ExpandedT2

     

    If you want a full outer join with DAX you can read this and modify yourself: https://www.antmanbi.com/post/full-outer-join-in-dax-in-power-bi-and-ssas-tabular