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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
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
karimkz
Advocate I
Advocate I

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
karimkz
Advocate I
Advocate I

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.

Anonymous
Not applicable

it worked as below.

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

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.