so the last week of a month will end on the last friday.
And assuming your data is correct in that it only reports Friday dates, This works
Code:
PARAMETERS [Enter a Year/Month (yyyymm)] Text ( 255 );
TRANSFORM Sum(data.Total) AS SumOfTotal
SELECT data.Employee
FROM data
WHERE (((Format([calendar_day],"yyyymm"))=[Enter a Year/Month (yyyymm)]))
GROUP BY data.Employee, Format([calendar_day],"yyyymm")
PIVOT (Day([calendar_day])\7)+1
for June you get
Employee |
1 |
2 |
3 |
4 |
10063812 |
27 |
45 |
14 |
40 |
10091779 |
|
|
|
3 |
10099236 |
1 |
1 |
|
|
10106805 |
18 |
31 |
40 |
40 |
10107021 |
|
30 |
50 |
50 |
for july
Employee |
1 |
10063812 |
45 |
10091779 |
2 |
10106805 |
40 |
10107021 |
20 |
10116097 |
40 |
10116159 |
40 |