Interesting. I actually have an application that I'm working on now for exactly that purpose - downtime hours by line. You can accomplish this by using several queries. I'm assuming your Downtime table also has WeekNo and RunDate fields? I'm also assuming you are storing your weekly hours in a table that also has Line, WeekNo, ScheduleHours. If so you can create the following queries to get you where you need to go.
Code:
SELECT Sum(tblLineDownTime.ActualDT) AS SumOfActualDT, tblLineDownTime.WeekNo, tblLineDownTime.Line
FROM tblLineDownTime
GROUP BY tblLineDownTime.WeekNo, tblLineDownTime.Line
Save this query - we will call it Query1
Create a new query and add your TotalHoursPerWeek (table you are storing weekly hours in). In my project it's called tblLineSchedule
Code:
SELECT tblLineSchedule.Line, tblLineSchedule.Hours, tblLineSchedule.WeekNo
FROM tblLineSchedule
Save this query - we will call it Query2
NOTE: Your tblLineSchedule should only have one record per line per week.
Create a new query and add Query1 and Query2 in it - join on weekNo and Line.
You probably don't really need Query2 as you can just join Query1 directly to your schedule table but I added it here as a visual.
you can start creating your calculated fields in this query.
Let me know if you need further help with this application or plan on making further enhancements. The application I am working on now has dynamic charts that provide downtime% by line and week with weekly average and ytd average trend lines - we have about 5 charts both line and bar charts that get drawn dynamically when a user selects the week or date range they want to view for.