reporting services - SQL Daily Totals -


ok trying make ssrs report gets daily totals of clients seen per employee , list day day. top row show every day in month e.g 1st ,2nd,3rd. first column should show names of employee.

i'm pretty sure nee use matrix unsure how go listing out days. if can me or point me in right direction great.

to add more info have table called employees employees want list , table appointments clients employees have seen. want total clients seen each employee every day of month days listed across top of table.

for example

      | 1st | 2nd | 3rd | 4th | 5th | 6th | 7th ..... emp1     2     3     5     4     5     5     6 emp2     3     4     5     9     1     3     5 emp3     1     0     0     4     5     9     2 emp4     8     3     7     2     9     3     4 

if want rows columns, need use pivot so:

example:

select vendorid, [250] emp1, [251] emp2, [256] emp3, [257] emp4, [260] emp5  (select purchaseorderid, employeeid, vendorid purchasing.purchaseorderheader) p pivot ( count (purchaseorderid) employeeid in ( [250], [251], [256], [257], [260] ) ) pvt order pvt.vendorid; 

if want columns rows, use unpivot.


Comments

Popular posts from this blog

javascript - Google App Script ContentService downloadAsFile not working -

javascript - Function overwritting -

php - Find a regex to take part of Email -