Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
104 | |
104 | |
87 | |
73 | |
66 |
User | Count |
---|---|
119 | |
111 | |
95 | |
79 | |
72 |