cancel
Showing results for
Did you mean:
Regular Visitor

## Calculate Total Sales Value while taking the prices/product from a different table

I have the following tables:

Sales with column ProductID, among others

Products with columns ProductID and Price among others.

I need to create a visual that will take the Revenue.

My question is how do I take the Price from the related table?

The same product can appear multiple times in the Sales table and I need to sum this Revenue.

1 ACCEPTED SOLUTION

Accepted Solutions
Regular Visitor

## Re: Calculate Total Sales Value while taking the prices/product from a different table

Didn't work for me.

But I figured it out by creating a new column in the Orders table

RevenuePerSale = 'Sales'[Quantity] * related(Products[Item Price])

And then the desired measure: Revenue (\$) = sum(Sales[RevenuePerSale])

3 REPLIES 3
Super Contributor

## Re: Calculate Total Sales Value while taking the prices/product from a different table

hi

use this measure:

Revenue = Sum(Sales[Units])*sum('Product'[Price])

And in a visual insert Product (from Product Table) and Revenue.

Lima - Peru

Proud to be a Datanaut!

Regular Visitor

## Re: Calculate Total Sales Value while taking the prices/product from a different table

Didn't work for me.

But I figured it out by creating a new column in the Orders table

RevenuePerSale = 'Sales'[Quantity] * related(Products[Item Price])

And then the desired measure: Revenue (\$) = sum(Sales[RevenuePerSale])

Frequent Visitor

## Re: Calculate Total Sales Value while taking the prices/product from a different table

It's ok to create NEW column, when you don't have much data.

In case you have a lot of data, it will increase storage volume, and, perhaps, slow down calculations.

Revenue = sumx( addcolumns( 'Sales'; "new column"; 'Sales'[Quantity] * related(Products[Item Price])); [new column])

Announcements

#### Challenge: Can You Solve These?

Find out how to participate in the first Power BI 'Can You Solve These?' challenge.

#### Community News & Announcements

Get your latest community news and announcements.

#### Microsoft Business Applications October Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

#### Win Power BI Swag with Community Kudopalooza!

Each week, complete activities and be qualified in the drawing for cool Power BI Swag.

Top Kudoed Authors
Users Online
Currently online: 110 members 1,605 guests
Recent signins: