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
Syndicate_Admin
Administrator
Administrator

Help with DAX formulas

Good day everyone!

I have these two tables and I want to make a measure where I add the output quantity per LOT and multiply it by the unit price of that lot.
Make the formula of the last image, the part of adding the quantities per lot works well, but when I get the unit price per lot, I do not get the expected result.
Could anyone help me?
Best regards!!

Denilson22_0-1624898984721.png

Denilson22_1-1624898990379.png

Denilson22_2-1624898996721.png

1 REPLY 1
Anonymous
Not applicable

Hi @Syndicate_Admin 

I think you want to get sum of quantity Per LOT from one Table and then multiply the sum with unit price in another table Per LOT. Due to your screenshot is not clear, I have built an sample for testing by myself. 

Quantity Table:

1.png

Unit Price Table:

2.png

Measure:

Multiply Per LOT = 
VAR _Quantiy = SUM(Quantity[Quantity])
VAR _Untity = SUMX(FILTER(ALL('Unit Price'),'Unit Price'[Lot] = MAX(Quantity[Lot])),'Unit Price'[Unit Price])
RETURN
 _Quantiy * _Untity

Result:

3.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. 

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.