Starting December 3, join live sessions with database experts and the Microsoft product team to learn just how easy it is to get started
Learn moreGet certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now
I have two tables, an Agency Invoice Table and a Hires Table. Both tables have mutliple key identifies (Req Number and Agency Name) that I'm trying to use to connect the two tables together to show the number of hires for each row of the Agency Table and to cost of hire (the amount we spent with the agency divided by the number of hires made by that agency). Below is an example of the two tables. How can I create a formula that creates a new column in the Agency Table that counts the number of hires from the Hires Table? Then, what formula will I use to calculate cost of hire?
Agency Table
Agency Name | Req Number1 | Req Number2 | Amount |
Example1 | 100 | 102 | $20,000 |
Example2 | 103 | $15,000 | |
Example3 | 104 | $10,000 |
Hires Table
Candidate Name | Req Number | Agency Name |
John Doe | 100 | Example1 |
Jane Doe | 102 | Example1 |
Test Doe | 103 | Example2 |
Michael Jordan | 104 | Example3 |
Solved! Go to Solution.
Hi @dreaves1 ,
Here's my solution.
1.In the Power Query Editor, select the two columns of Req Number, and then click Unpivot.
Then you will get this.
2.Create the following calculated columns in the two tables respectively.
AgenceyName&ReqNumber = [Agency Name]&"-"&[Value]
AgenceyName&ReqNumber = [Agency Name]&"-"&[Req Number]
3.Create a relationship between tables.
4.Create a table visual with the following fields. The visual shows the cost of hire.
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @dreaves1 ,
Here's my solution.
1.In the Power Query Editor, select the two columns of Req Number, and then click Unpivot.
Then you will get this.
2.Create the following calculated columns in the two tables respectively.
AgenceyName&ReqNumber = [Agency Name]&"-"&[Value]
AgenceyName&ReqNumber = [Agency Name]&"-"&[Req Number]
3.Create a relationship between tables.
4.Create a table visual with the following fields. The visual shows the cost of hire.
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@dreaves1 what is your desired output?
I'm trying to calculate cost of hire.
Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.
User | Count |
---|---|
92 | |
86 | |
85 | |
66 | |
49 |
User | Count |
---|---|
140 | |
113 | |
106 | |
64 | |
60 |