Forum Discussion

Syndicate_Admin's avatar
Syndicate_Admin
Icon for Administrator rankAdministrator
3 years ago

Calculate course hours

Hello everyone. I have the following problem. I have an excel database with the actions performed by each student. This is the fact table. The dimension table is student and teacher. In each record of facts it puts the day that the formative action is carried out, start time, end, course, if the action is group or individual and the teacher who imparts the action. Now I want to know the total number of hours taught by each teacher, but as a sum of the hours per course, calculate the sum of the hours of each student with which a course of 5 hours for ten students, tells me that the teacher has taught 50 hours, when in fact he has taught 5. I attach the table.

I've tried to solve it in many ways. For example, calculating the sum of all course hours per student, divided by the number of students per course day, but still adding the total hours per student. I attach the pivot table.

As you can see the number of students, the total hours per class, but I divide the hours by the students. A help please.

1 Reply