cancel
Showing results for
Search instead for
Did you mean:
Helper I

## Sum values of a join relation

Good morning,

I have the following tables:

 Car Value A 2 B 1

and

 Car Region A USA A INDIA B INDIA

I have related the tables through the Car field.

I am trying to get the sum of every resulting line from the join, but I am getting just the sum of the cars table.

The measure gives 3 as a result, but should give 5. And it is calculated like this:

Medida = SUMX(Cars, Cars[Value])

 Car Value Region A 2 USA A 2 INDIA B 1 INDIA 5

How should I achieve this?

Thank you so much!
1 ACCEPTED SOLUTION
Community Champion

Hi, @mizaskun

Please try the below.

The link to the sample pbix file is down below.

Values Total =
SUMX( Regions, RELATED(Cars[Value]))

Hi, My name is Jihwan Kim.

If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.

Linkedin: linkedin.com/in/jihwankim1975/

Twitter: twitter.com/Jihwan_JHKIM

If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.

Best regards, JiHwan Kim

Linkedin: https://www.linkedin.com/in/jihwankim1975/

Twitter: https://twitter.com/Jihwan_JHKIM

4 REPLIES 4
Community Champion

Hi, @mizaskun

Please try the below.

The link to the sample pbix file is down below.

Values Total =
SUMX( Regions, RELATED(Cars[Value]))

Hi, My name is Jihwan Kim.

If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.

Linkedin: linkedin.com/in/jihwankim1975/

Twitter: twitter.com/Jihwan_JHKIM

If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.

Best regards, JiHwan Kim

Linkedin: https://www.linkedin.com/in/jihwankim1975/

Twitter: https://twitter.com/Jihwan_JHKIM

Helper I

Good afternoon,

This is not working on a many to many relation. How should I achieve that average with a many to many relationship?

Thank you so much!

Community Champion

Hi, @mizaskun

thank you for your feedback.

Sorry that I am not familiar with how many to many relationship works.

If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.

Best regards, JiHwan Kim

Linkedin: https://www.linkedin.com/in/jihwankim1975/

Twitter: https://twitter.com/Jihwan_JHKIM

Helper I

Thank you so much anyway!

## Helpful resources

Announcements

#### Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group!

#### 2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

#### Check it out!

Click here to read more about the July 2021 Updates

#### Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Top Solution Authors
Top Kudoed Authors