Forum Discussion

coolshib's avatar
coolshib
Helper III
6 years ago
Solved

Need help to compare two tables using multiple criteria

Hello Everyone, I have following tables   Location: 1 Company Product Sale ABC Apple 100 XXX Orange 200 YYY Pear 300 ZZZ Banana 400   Location: 2 Company Pr...
  • Anonymous's avatar
    Anonymous
    6 years ago

    coolshib 

    Once you have created a relationship between the tables, you could create measure that returns the sales in location 2. 

     

     

    Sale location2 = CALCULATE(SUM(Location2[Sale]),
    FILTER(Location1,Location1[Product] in VALUES(Location2[Product])),
    FILTER(Location1,Location1[Company] in VALUES(Location2[Company])))

     


     

    Paul Zheng