The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event! Join us in Stockholm, Sweden from September 24-27, 2024.
2-for-1 sale on June 20 only!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
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.
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the June 2024 Power BI update to learn about new features.
User | Count |
---|---|
104 | |
97 | |
80 | |
62 | |
57 |
User | Count |
---|---|
264 | |
120 | |
115 | |
83 | |
70 |