Forum Discussion
Poovarasan
5 years agoFrequent Visitor
DAX Many to Many
I have a two tables with Many-To-Many relationship, Here's the screenshot for two tables Table1: Table2: I need to create measure like this Sum of rate = Sumx(Table1,IF(Table1'Year...
Samarth_18
Community Champion
5 years agoHi Poovarasan ,
Is this the expected output you are looking for, if not then could you please share expected output as well?
Poovarasan
5 years agoFrequent Visitor
- Samarth_185 years ago
Community Champion
Hi Poovarasan ,
Based on provided data total sum of rate is 149.56, how it could be 333.68, if the output which you have provided is not based on provided data then you can try below code:-
Sum of Rate = VAR result = CALCULATE ( SUM ( 'Table1'[Rate] ), FILTER ( Table2, Table2[Year&Month] <= MAX ( Table1[Year&Month] ) ) ) RETURN IF ( result = 0, 0, result )Output:-