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
Marcos_Noguer
New Member

SUMPRODUCT

Hi all!

 

I need help to set a new measure. I have 3 tables: Product, Product Sales and Product Ingridients. I need to creat a measure that calculates de amount of ingredients I consumed. The tables are related by Product.

 

Example:

Marcos_Noguer_0-1676476128417.jpeg

 

The correct answer here is 733 * 5 + 719 * 5, no (733+719)*(5+5).

 

Thanks!

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Marcos_Noguer ,

 

Here I create a sample to have a test.

RicoZhou_0-1676615687227.png

RicoZhou_1-1676615694930.png

SumProduct =
VAR _SUMMARIZE =
    SUMMARIZE (
        VALUES ( 'Table 1'[ID] ),
        [ID],
        "Value", CALCULATE ( SUM ( 'Table 1'[Value] ) ) * CALCULATE ( SUM ( 'Table 2'[Value] ) )
    )
RETURN
    SUMX ( _SUMMARIZE, [Value] )

Result is as below.

RicoZhou_2-1676615776748.png

Best Regards,
Rico Zhou

 

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

2 REPLIES 2
Anonymous
Not applicable

Hi @Marcos_Noguer ,

 

Here I create a sample to have a test.

RicoZhou_0-1676615687227.png

RicoZhou_1-1676615694930.png

SumProduct =
VAR _SUMMARIZE =
    SUMMARIZE (
        VALUES ( 'Table 1'[ID] ),
        [ID],
        "Value", CALCULATE ( SUM ( 'Table 1'[Value] ) ) * CALCULATE ( SUM ( 'Table 2'[Value] ) )
    )
RETURN
    SUMX ( _SUMMARIZE, [Value] )

Result is as below.

RicoZhou_2-1676615776748.png

Best Regards,
Rico Zhou

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi RicoZhou,

 

Thank you! It works perfectly! Kudus to you!

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

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

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.