Forum Discussion

MohamedKamel's avatar
MohamedKamel
Frequent Visitor
5 years ago
Solved

Incorrect Division Measure Calculation With Inputs From Two Different Tables

Hi All,   I have a division measure that is supposed to get the numerator from table 1 and the denominator from table 2. I created a many to many active relationship between two compound keys in bo...
  • v-easonf-msft's avatar
    5 years ago

    Hi, MohamedKamel 

    It is not recommended to create  many-to-many table relationship between two tables.

    You can try to insert another intermediate table "Table3" about "Compound keys", which contains 5 columns (compoundkeys, date, area, line, machine)

     

     

     

    Table3 = DISTINCT(UNION(SUMMARIZE(Table1,Table1[Date],Table1[Area],Table1[Machine],Table1[line],Table1[CompoundKey]),SUMMARIZE(Table2,Table2[Date],Table2[Area],Table2[Machine]Table2[line],Table2[Compound Key])))

     

     

     

    After establishing  one-to-many relationship with the original two tables through the key "Compound keys", then apply the fields in Table 3 to slicers to filter other  tables' data.

     

    Best Regards,
    Community Support Team _ Eason