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
bcap01
Helper II
Helper II

Simple JOIN

Hello,

 

I am a PowerBI/DAX newbie. I am looking to understand how to JOIN two tables to do a simple calculation. 

 

For example, lets say I have two tables Invoices and Costs that JOIN based on JobID.  

 

Invoice Table -  SELECT JobID, InvoiceAmt FROM Invoices

Cost Table - SELECT JobID, Cost FROM Costs

 

In DAX Format I would like to join these 2 tables to show the calculation:  GP = [InvoiceAmt] - [Cost]

 

WHat I have tried is the following but got error message.

 

GP = (Invoice[InvoiceAmt]) - (Costs[Cost])

 

Any help is sincerely appreciated!

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

HI @bcap01,

You cannot directly use different table columns in one formula, you can try to reference or use current table value to lookup corresponds table values and use this in calculations.

Using RELATED and RELATEDTABLE in DAX - SQLBI

Power BI Compares Two Columns in Different Tables - SPGuides

Regards,

Xiaoxin Sheng

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

HI @bcap01,

You cannot directly use different table columns in one formula, you can try to reference or use current table value to lookup corresponds table values and use this in calculations.

Using RELATED and RELATEDTABLE in DAX - SQLBI

Power BI Compares Two Columns in Different Tables - SPGuides

Regards,

Xiaoxin Sheng

bcap01
Helper II
Helper II

the error message i am getting is, "A single value for column '' in table '' caanot be determined. This can happen when a measure formula refers to a column that contains values without specifiying an aggregation..."

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.