Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a pivot table that looks something like this:
Employee Name | Monday | ||
---|---|---|---|
Clock In Time | Clock Out Time | Time Worked | |
Arnold | 9:00 AM | 5:00 PM | 08:00 |
It includes data for weekdays Monday - Friday. The data tab for my pivot table looks like this:
Rows
EmployeeName
Columns
DayOfWeek
Measures
ClockInTime
ClockOutTime
TimeWorked
I would like for my pivot table to include a weekly average of time worked based on each day's TimeWorked value. How could I go about this?
What is your expression for TimeWorked? and where would you like to see the Average in your chart?
My expression for TimeWorked is Interval( ClockOutTime - ClockInTime, 'hh:mm') and it would be great to have the average at the end of the row.
May be this
Interval(Avg(ClockOutTime - ClockInTime), 'hh:mm')
and enable the totals for Employee Name dimension
I have tried that expression, but it does the average for each day, which is the same value as Time Worked. I would like for it to average the entire week, but since Day is being used as the column in the pivot table I am having a hard time doing this.
I did look for totals, but I cannot find them anywhere in my pivot table settings (does not appear in Data, Sorting, Add-ons, or Appearance).
Edit:
I see now that I can include totals. However, it totals the columns and not the rows.
Have you enable the total for the Employee Name field?
I did. However, the totals are by column, not by row. Is there a way to total them by row?
Enable the total for your Day/Date dimension
That is much better! Is there a way to specify which values to total?
For instance, right now it shows me the first time an employee clocked in for the week and the last time, which I don't need to see. I would also like to see an average for the week, but not per day (as per day average is just time worked anyway).
You can configure this using an approach which have been used many times on the community... sharing some of those to help you understand it better
Qlikview Pivot Chart with new dimension and expression