Forum Discussion

gianmarco's avatar
gianmarco
Helper IV
3 years ago
Solved

DAX formula

Dear All, I have the following two tables:   TABLE1 CompanYName1 Amount€ ALPHA LLC 5.000 ACME INC 1.000 SOYLENT GREEN CORP 3.000 SLUDO LLC 4.000 XXX A SEXY HORROR COMPANY ...
  • Greg_Deckler's avatar
    Greg_Deckler
    3 years ago

    gianmarco It should be if you use the same "__Company" column name. That's the reason to use SELECTCOLUMNS. I mocked it up and it seems to work. See attached PBIX below signature.

  • Anonymous's avatar
    Anonymous
    3 years ago

    Hi  gianmarco ,

     

    Here are the steps you can follow:

    1. Create measure.

    Measure =
    var _table2=SELECTCOLUMNS('Table2',"1",[CompanYName2])
    return
    SUMX(FILTER(ALL(Table1),
    NOT('Table1'[CompanYName1]) in _table2),[Amount€])

    2. Result:

     

    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