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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
User38690
Regular Visitor

How to calculate total prices from different product in different table

Hello, 

I have two tables Prices and Sales. In the first table I have all product list with the prices in the other one a have the list of the sales with the columns date, products, vendor, shop, region, quantity. What I want to do is to calculate all amount of the sales. I try to do the matrix when in the columns I put month, region, shop, product and vendor. I create the measure: TOTAL_SALES = SUM(sales[quantity]) * SUM(product[price]), but I get very large number that is not true. When I expend matrix until products I got real numbers. So my guess is that it first adds up all the prices and products quantity and the do multiplication. So how can I solve this problem?

User38690_0-1712136004138.png

(The first column is quantity the other one total price)

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @User38690 

try below dax measure for calculating the total prices



TOTAL_SALES = 
SUMX(
    Sales,
    Sales[Quantity] * RELATED(Products[Price])
)

 

View solution in original post

1 REPLY 1
Anonymous
Not applicable

Hi @User38690 

try below dax measure for calculating the total prices



TOTAL_SALES = 
SUMX(
    Sales,
    Sales[Quantity] * RELATED(Products[Price])
)

 

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 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.

Top Solution Authors
Top Kudoed Authors