Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

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
GroupCost
A5
A5
B4
 
Table B 
GroupCost
A10
B4
 
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

  • I think this will work

    Cost = CALCULATE( SUM('A'[Cost]), TREATAS( VALUES('B'[Group]), 'A'[Group]) )
  • Anonymous's avatar
    Anonymous
    Not applicable

    Execellent John, Its working as expected