My query shows all records within a date range and other criteria. See below.
Currently it list each serial number (machine) on a separate line and then shows downtime for that incident and it also shows availability by percentage based off of coverage hours. Example if serial number 123 has 10 hours down and coverage hours are 20, then percentage is .5 or 50 percent and this works correctly. But if the serial number 123 has two or more calls it shows each call and the percentage of downtime per call.
I need to figure out how to combine any records with the same serial number and display the combined downtime , then the percentage of total downtime. Using the example above if I had two records for serial 123 one for 10 hours downtime and one for 5 hours downtime the total downtime would be 15 hours/ 20 hours available for .25 percentage. It should not add both percentage up and average them because it would end up at .62.5 which is incorrect for what I need.
So how could I combine all records by serial number?
Attached is a screen shot my DesignView and DataSheetView .
I hope this makes sense and thanks for any input
RK
Currently it list each serial number (machine) on a separate line and then shows downtime for that incident and it also shows availability by percentage based off of coverage hours. Example if serial number 123 has 10 hours down and coverage hours are 20, then percentage is .5 or 50 percent and this works correctly. But if the serial number 123 has two or more calls it shows each call and the percentage of downtime per call.
I need to figure out how to combine any records with the same serial number and display the combined downtime , then the percentage of total downtime. Using the example above if I had two records for serial 123 one for 10 hours downtime and one for 5 hours downtime the total downtime would be 15 hours/ 20 hours available for .25 percentage. It should not add both percentage up and average them because it would end up at .62.5 which is incorrect for what I need.
So how could I combine all records by serial number?
Attached is a screen shot my DesignView and DataSheetView .
I hope this makes sense and thanks for any input
RK