Forum Discussion

Burner's avatar
Burner
Regular Visitor
5 years ago
Solved

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:

CustomerUserjobduration in hour
abcdJacktask 12
xyz inc.Tomtask 25
qwerty llcSarahtask 34
abcdBobtask 33
xyz inc.Tomtask 26
qwerty llcJacktask 14

 

and then i have the user table with user name and hourly cost of the user:

Useruser cost per hour
Jack25$
Tom23$
Sarah27$
Bob26$

 

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.

Userduration (hour)total cost
Jack4X
Sarah4X

 

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

  • 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]