Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and a 50 percent discount on exams.
Get startedEarn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
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!
Solved! Go to Solution.
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
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
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..."