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
Anonymous
Not applicable

Creating new calculated field using multiple columns from multiple tables

Hi All,

 

I have a scenario where i want to create a calculated column which is using two other columns from 2 other tables.

I have 3 tables as  - labor_terminations, employee & workday_cost_centers. These three tables are connected with each other.

labor_terminations is connected with workday_cost_centers and employee is also connected with workday_cost_centers.

Please find the screenshots for understanding the relation.

 

When i am trying to create new column in labor_terminations i want one column from employee and one from workday_cost_centers. Since labor_terminations is not directly connected with employee it is not showing any column of employee table even with the use of related keyword.

 

Capture.JPG

 

Any help would be greatful.

 

Regards,

Shailesh

 

1 REPLY 1
Eric_Zhang
Microsoft Employee
Microsoft Employee


@Anonymous wrote:

Hi All,

 

I have a scenario where i want to create a calculated column which is using two other columns from 2 other tables.

I have 3 tables as  - labor_terminations, employee & workday_cost_centers. These three tables are connected with each other.

labor_terminations is connected with workday_cost_centers and employee is also connected with workday_cost_centers.

Please find the screenshots for understanding the relation.

 

When i am trying to create new column in labor_terminations i want one column from employee and one from workday_cost_centers. Since labor_terminations is not directly connected with employee it is not showing any column of employee table even with the use of related keyword.

 

Capture.JPG

 

Any help would be greatful.

 

Regards,

Shailesh

 


@Anonymous

The snapshot shows the table labor and employ are in a many-to-many relationship, so you'll have to use RELATEDTABLE. So to create a calculated column in the table labor, the DAX shall be like

calculated column = SUMX(RELATEDTABLE(employee),employee[somecolumn])

For further advice, please post some smaple data nd expected output.

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!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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