1 Reply Latest reply: Dec 1, 2015 9:11 PM by Marcus Sommer

Calculate Salary by Month -Weeks

Hi everyone,

I need your help please  Actually i need to calculate the salary by Moth - weeks but the problem is that i have short weeks

for example for october 2015;

In the first week IF the date is between

Fecha_Ini       Fecha_Fin

2015-09-28    2015-10-04

the calculate is  = (Salary/7)*4

where the 4 are the working days for October between the first week what i mean is that just i take the working days of the october in the first week.

Now other example the same month we go  the last week of october what happen?

Fecha_Ini     Fecha_Fin

2015-10-26  2015-11-01

again we have Short Weeks the calcuate just only take the days of the week in october

the calculate is  = (Salary/7)*6

here the 6 are the working days for October between the last week what i mean is that just i take the working days of the october in the last week.

guys do you understand what i nedd?? please can your help me??

Thanks REGARDS!!!!!

• Re: Calculate Salary by Month -Weeks

You could try it with something like: count(distinct Date) which might need further conditions inside but this will depend from your data-structure and the way how do you want to display it.

Easier could be therefore to create a cumulative weekday-counter within the script in a master-calendar per peek() or previous(), see: Peek() or Previous() ?

- Marcus