Forum Discussion
Multiply grouped by filter sum by a fixed value
Hello everybody
i'm stuck with a problem i cannot resolve.
I have a timesheet with costumers, task, user who did the job and duration of the task measured in hous. like this one:
| Customer | User | job | duration in hour |
| abcd | Jack | task 1 | 2 |
| xyz inc. | Tom | task 2 | 5 |
| qwerty llc | Sarah | task 3 | 4 |
| abcd | Bob | task 3 | 3 |
| xyz inc. | Tom | task 2 | 6 |
| qwerty llc | Jack | task 1 | 4 |
and then i have the user table with user name and hourly cost of the user:
| User | user cost per hour |
| Jack | 25$ |
| Tom | 23$ |
| Sarah | 27$ |
| Bob | 26$ |
when i create a table using filter by costumer i see the users who worked for that costumer and total hours of work for each user, and i want to calculate the total cost given by total duration * user cost from the previously table. When i create a new quick measure using multiply function if uses the count operator and i cannot just multiply the fixed value from user's table for the total duration of job.
| User | duration (hour) | total cost |
| Jack | 4 | X |
| Sarah | 4 | X |
Any help?
thank you
Burner , You can create a new column like this and sum that up
Total cost in table 1 = maxx(filter(Table2, Table2[user] = Table1[user]),Table2[cost]) * Table1[duration in hour]
2 Replies
- amitchandak
Super User
Burner , You can create a new column like this and sum that up
Total cost in table 1 = maxx(filter(Table2, Table2[user] = Table1[user]),Table2[cost]) * Table1[duration in hour]
- BurnerRegular Visitor