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
akwang
Advocate II
Advocate II

Measure from lookup table

Hi I have two tables one is my fact tabe which has qty of items sold and another table which has the net weight for each product. I want to calculate the net weght of product sold by QTY * Net wgt. Currently I use the RELATED function to import from the lookup table to another column, but is their a better solution?Screenshot_2.jpg

1 ACCEPTED SOLUTION
Anonymous
Not applicable

You could avoid using a calculated column with the following measure:

 

Net Weight Sold =
SUMX (
    tbl_SAP_Data,
    tbl_SAP_Data[Net Qty] * RELATED ( tbl_Prod_Description[Net Weight (g)] )
)

This measure will iterate over each row in the tbl_SAP_Data table.  In each row, it will multiple the [Net Qty] column by the appropriate [Net Weight (g)] column from your lookup table, thanks to using RELATED() within the row context created by iterating with SUMX.

View solution in original post

1 REPLY 1
Anonymous
Not applicable

You could avoid using a calculated column with the following measure:

 

Net Weight Sold =
SUMX (
    tbl_SAP_Data,
    tbl_SAP_Data[Net Qty] * RELATED ( tbl_Prod_Description[Net Weight (g)] )
)

This measure will iterate over each row in the tbl_SAP_Data table.  In each row, it will multiple the [Net Qty] column by the appropriate [Net Weight (g)] column from your lookup table, thanks to using RELATED() within the row context created by iterating with SUMX.

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!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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.