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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

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
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.