mardi 4 mars 2014

Dividing 2 Columns in Access


Vote count:

0




I have a table with employees and their cost data, I have a field where I summed up the total by group and a sumiif to count the number of employees who had cost at all. I am trying to get the average of the total amount divided by the number of employees who received cost I also need to get the percentage of the number of employees who received compensation divided by the total number of employees. Avg did not work for me and I cannot find a dividing code that works. THe whole code is below:



SELECT tblRaw_Data.[Type Plan], Count(tblRaw_Data.[Emp ID #]) AS [CountOfEmp ID #], Sum(tblRaw_Data.[COLA AMOUNT]) AS [SumOfCOLA AMOUNT], Sum(IIf([COLA AMOUNT]>0,1,0)) AS Received_COLA
FROM tblRaw_Data
GROUP BY tblRaw_Data.[Type Plan];


asked 1 min ago






Aucun commentaire:

Enregistrer un commentaire