Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowThe Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.
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!
Check out the February 2025 Power BI update to learn about new features.
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
User | Count |
---|---|
83 | |
69 | |
68 | |
39 | |
37 |