Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
STRUSINIO
Frequent Visitor

Passing values in tables with relation many to many

Hey,
im facing the problem with passing values between two tables in many to many relationship (product to product).
Table1:

STRUSINIO_0-1684764119167.png

 

Table 2:

STRUSINIO_1-1684764119172.png

 


What im trying to do is to create a calculated column in Table 1 that will show Sum of sales for specific product but only once. 
Expected result:

 

already played with sumx function in different ways, but it always replicate my results for each of three rows in that example.
Im woundering if that expected output is even possible to create. 

Thanks in advance for any guidence 

 

 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @STRUSINIO ,

Your expected result is blank, so i just could give solution according to your description.

Please try to create a calculate column with below dax formula:

 

Column =
VAR _a = [Product]
VAR tmp =
    FILTER ( ALL ( Table2 ), [Product] = _a )
RETURN
    SUMX ( tmp, [Sales] )

 

vbinbinyumsft_0-1684896132392.png

Please refer the attached .pbix file.

 

Best regards,
Community Support Team_Binbin Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
Anonymous
Not applicable

Hi @STRUSINIO ,

Your expected result is blank, so i just could give solution according to your description.

Please try to create a calculate column with below dax formula:

 

Column =
VAR _a = [Product]
VAR tmp =
    FILTER ( ALL ( Table2 ), [Product] = _a )
RETURN
    SUMX ( tmp, [Sales] )

 

vbinbinyumsft_0-1684896132392.png

Please refer the attached .pbix file.

 

Best regards,
Community Support Team_Binbin Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.