Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Calculating expression containing two aggregated expressions

Hi,

I am having some difficulties calculating an expression.

I have a table looking like this:

number of hours

dateproject idtask idemployee id

The table contains daily working hours of employees for tasks that are a part of a certain project.

I would like to display the cost of each project by calculating for each employee, the number of hours spent on a project for a month, divided by the total number of hours worked by the employee that same month. After I get that I would want to multiply the result by the employee's salary for that month, and then summarize all results to get the total cost of a project.

I tried using this:

=sum((Aggr(sum([Employee Task Minutes])/sum({$<[Task ID]=, [Project Number]=>}[Employee Task Minutes]), YYYYMM))*vHourCost*vMonthlyHours)

This, unfortunately, does not work.

Does anyone have an idea for this?

Thanks,

Yaniv

2 Replies
Not applicable
Author

Can you upload the sample application

Not applicable
Author

I added a photo showing the wanted pivot table. The 'Total hours reported' column shows the hours reported for that task, now I want to get the total number of hours reported by the employee for the months that project was reported as being worked on.

print screen.png