cancel
Showing results 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

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.

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

4 REPLIES 4
Community Champion

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.

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

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

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

Helper I

Thank you so much anyway!

Announcements