Forum Discussion

HenrikH29's avatar
HenrikH29
Advocate I
9 years ago

Problem calculation total work hours

I need to calculate the total work time per employee for a given period (ie month).

 

Our employees have a normal work time calender with a daily work time ie 7.5 hours monday to thursday and 7 hours friday totalling 37 hours per week. Some employees work parttime and have a differenct worktime calender ie. 6 hours a day totalling 30 hours per week. And some again have diffent worktimes per day/week.

 

A date table holds the daily work time per given worktime-calender:

 

Dato = Date

Timer = The total work hours that date

Kalendernr = The number for the special work-calender (ie Kalendernr "0" that has 7.5 hours per day exept friday thats 7 hours., Kalendernr "85" has 5 hours per day - not shown above, Kalendernr xx has other work hours etc.),

 

The Calendertable is joined with the employee-table:

 

Medarb nr. = the employee number

Kalendernr the joined field with the Calender-table

 

I have af period-slicer joined with the date table controlling the date interval and it works.

 

The problem is that the calculated value i get in the field "Timer" in the date table is only for one person - because the date table (workcalender) only hold the data once. I somehow have to multiply that with the number of employees with that given Work-calender - or ?.

 

Any ideas...

12 Replies

  • Greg_Deckler's avatar
    Greg_Deckler
    Community Champion

    I can't get to the answer for this with the information provided, can you supply some of your raw data or a sample of mocked up data? It sort of sounds like you are doing a join in M and perhaps you need to import them as separate tables and relate them properly in order to get the effect that you want.

      • ceebu's avatar
        ceebu
        Advocate I

        HenrikH29 wrote:

        Hi smoupre


         

        And another problem is, that it doesnt show the values per employee  group but the same value for all groups.



         

        Did you make the cross filter direction "Both" under relationships ? This is what I get what I make that change..