March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch 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.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
132 | |
90 | |
88 | |
64 | |
58 |
User | Count |
---|---|
203 | |
141 | |
107 | |
73 | |
70 |