Forum Discussion
Calculated Column - 2 Tables
- 6 years ago
If Table 1 is on the many side, you can use this expression to get your result
NewColumn = Table1[Hours at Completion] - RELATED(Table2[Travel Hours])
If this works for you, please mark it as the solution. Kudos are appreciated too. Please let me know if not.
Regards,
Pat
Anonymous share the sample data and expected output. Read this post to get your answer quickly.
https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490
Although you can try to add column in the table that is on the many sides by using DAX function called RELATED to refer column from one side.
I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos whoever helped to solve your problem. It is a token of appreciation!
⚡Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.⚡
- Anonymous6 years agoNot applicable
Table 1:
Project Code Hours at Completion Project A 90 Project B 80 Project C 102 Table 2:
Project Code Travel Hours Project A 5 Project B 0 Project C 4 Desired Output: (Hours at Completion - Travel Hours)
Project Code (Hours at Completion - Travel Hours) Project A 85 Project B 80 Project C 98 - mahoneypat6 years agoMicrosoft Employee
If Table 1 is on the many side, you can use this expression to get your result
NewColumn = Table1[Hours at Completion] - RELATED(Table2[Travel Hours])
If this works for you, please mark it as the solution. Kudos are appreciated too. Please let me know if not.
Regards,
Pat
- Anonymous6 years agoNot applicable
That worked perfectly. Thanks so much!