cancel
Showing results for
Did you mean:

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a \$100 discount. Register Now

Anonymous
Not 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

1 ACCEPTED SOLUTION
Super User

I think this will work

``Cost = CALCULATE( SUM('A'[Cost]), TREATAS( VALUES('B'[Group]), 'A'[Group]) )``
2 REPLIES 2
Anonymous
Not applicable

Execellent John, Its working as expected

Super User

I think this will work

``Cost = CALCULATE( SUM('A'[Cost]), TREATAS( VALUES('B'[Group]), 'A'[Group]) )``

Announcements

#### Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

#### Power BI Monthly Update - February 2024

Check out the February 2024 Power BI update to learn about new features.

#### Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

#### Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.

Top Solution Authors
Top Kudoed Authors