Expanded table works from the many side of a relationship to the one side. In your example, table 1 expanded table contains table 2 but not vice-versa.
table 1
* <- 1 table 2
this is correct
SUMX(table1, DIVIDE(table1[col1], related(table2[col1]) )
RELATEDTABLE works from the one side to the many side and it returns the table with the rows corresponding to the one side
SUMX(table2, COUNTROWS( RELATEDTABLE(table1) ) )
the many to many relatioship in DAX are not a generic many to many relationship but some sort of "one to many at a higher level of granularity". In this case we have single direction relationships that from the point of view of the RELATEDTABLE function should behave like 1 to many relationships. RELATED instead cannot work since no single row can be returned.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…