Forum Discussion
Anonymous
4 years agoNot applicable
How Get In measures
Cost = CALCULATE(SUM(A[Cost]),FILTER(A,A[Group]=B[Group]))
This my calculated column DAX its giving expected result, I have tried many ways to create this in Measure But I am not able to achive the result by measure.
Table A
| Group | Cost |
| A | 5 |
| A | 5 |
| B | 4 |
Table B
| Group | Cost |
| A | 10 |
| B | 4 |
I want result as Table B, How I achive the above mentioned results using measure
I think this will work
Cost = CALCULATE( SUM('A'[Cost]), TREATAS( VALUES('B'[Group]), 'A'[Group]) )
2 Replies
- johnt75Super User
I think this will work
Cost = CALCULATE( SUM('A'[Cost]), TREATAS( VALUES('B'[Group]), 'A'[Group]) ) - AnonymousNot applicable
Execellent John, Its working as expected