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.
Hi
I have a large trfact table with the hours per employee per date. I also have an employee table which is linked to this tabel which contains the Hourly rate. I want to Calculate the [sum of hours] * [hourly rate] without having to add an extra column to my large fact table.
Hours table
Date | Employee id | Hours |
1-1-2021 | 1 | 2 |
1-1-2021 | 1 | 3 |
1-1-2021 | 2 | 5 |
2-1-2021 | 2 | 3 |
My employee table looks like this
Id | rate |
1 | 10 |
2 | 15 |
I Want to multiply the hourly rate times the sum of the hours to get the total amount.
hope you can help me
Solved! Go to Solution.
Hi @BobKoenen !
You need to have following 2 measure;
Total Hours = SUM(Hours[Hours])
Total Amount = SUMX(RELATEDTABLE(Employee), [Rate] * [Total Hours])
Your Employee & Hours table needs to be connected through Active relationship based on EmployeeID column.
The first measure calculates [Total Hours], second measure calculates [Total Amount], You can plot this against EmployeeID or any other attribute.
Regards,
Hasham
Hi @BobKoenen !
You need to have following 2 measure;
Total Hours = SUM(Hours[Hours])
Total Amount = SUMX(RELATEDTABLE(Employee), [Rate] * [Total Hours])
Your Employee & Hours table needs to be connected through Active relationship based on EmployeeID column.
The first measure calculates [Total Hours], second measure calculates [Total Amount], You can plot this against EmployeeID or any other attribute.
Regards,
Hasham
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 |
---|---|
39 | |
20 | |
19 | |
16 | |
15 |
User | Count |
---|---|
49 | |
26 | |
22 | |
17 | |
16 |