cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Anonymous
Not applicable

Caliculated Column for 2 Related Tables

Hi Guys,

 

I have 2 tables (Orders,Sales) which both has common field OrderID,

i would like to Multiply Orders table Quatity field and Sales Table Amount field.

 

TotalSales=Orders.Quantity*Sales.Amount

 

this Caliculated field i want to add in Sales table.

 

Can some one guide me Formulae,im new to DAX.

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Frequent Visitor

Re: Caliculated Column for 2 Related Tables

Hi there! 

 

First you need to create a relatonship. Go to Modelling tab, Manage Relationships. Create new one and choose OrderID field. 

 

Then you create a new column, and write something like this:

 

TotalSales = Sales[Amount]*RELATEDTABLE(Orders; Orders[Quantity])

 

 Should work out, maybe even without a relatedtable thingy.

View solution in original post

2 REPLIES 2
Highlighted
Frequent Visitor

Re: Caliculated Column for 2 Related Tables

Hi there! 

 

First you need to create a relatonship. Go to Modelling tab, Manage Relationships. Create new one and choose OrderID field. 

 

Then you create a new column, and write something like this:

 

TotalSales = Sales[Amount]*RELATEDTABLE(Orders; Orders[Quantity])

 

 Should work out, maybe even without a relatedtable thingy.

View solution in original post

Highlighted
Anonymous
Not applicable

Re: Caliculated Column for 2 Related Tables

it worked as below.

TotalSales = Sales[Amount]*RELATED(Orders[Quantity])

Helpful resources

Announcements
August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

July 2020 Community Highlights

July 2020 Community Highlights

Learn about the exciting things that happened in July.

Upcoming Events

Upcoming Events

Wondering what events you could join or have an event to promote yourself? Check out our Upcoming Events.

Get Ready for Power BI Dev Camp

Get Ready for Power BI Dev Camp

We are thrilled to announce we will begin running a monthly webinar series named Power BI Dev Camp.

Top Solution Authors
Top Kudoed Authors