Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Compare two columns

I need to compare two columns from two different tables which there is no relation between them but they both are connected to a fact table.   Table2------Key1-------- Facttable Facttable---Key2--...
  • PaulDBrown's avatar
    PaulDBrown
    5 years ago

    Anonymous 

    Try: 

    Comparison measure =
    SUMX (
        SUMMARIZE (
            Facttable,
            Table2[columnA],
            Table1[columnD],
            "@result", IF ( SUM ( Table2[columnA] ) = SUM ( Table1[columndD] ), 0, -1 )
        ),
        [@result]
    )