Forum Discussion

Pikachu-Power's avatar
Pikachu-Power
Icon for Impactful Individual rankImpactful Individual
5 years ago
Solved

UNION DISTINCT question

hi all,   i found following way to combine two distinct tables and use UNION like in SQL (without double entries):   TABLE_X = UNION ( SUMMARIZE(Table1, Table1[A], Table1[B], Table1[C]), SUMM...
  • Anonymous's avatar
    Anonymous
    5 years ago

    Hi  Pikachu-Power ,

    You can write this DAX:

    TABLE =
    Var _X= UNION (
    SUMMARIZE(Table1, Table1[A], Table1[B], Table1[C]),
    SUMMARIZE(Table2, Table2[A], Table2[B], Table2[C])
    )
    Return 
    SUMMARIZE(_X,[A], [B], [C])

     

    Best Regards,

    Liu Yang

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.