So, imagine having a list of customers and all of their different order amounts;
EX: customer1 order1 amount1
customer1 order2 amount2
customer2 order3 amount3
customer1 order4 amount4
say all of that information is in a query and I want to average each customer's total amount, so essentially take row 1 and 2 and 4, average the amount and take row 3 and average the amount. Is this possible?
Right now I'm just trying to get it to average just one set of rows but instead of customers I'm using machines and PM's completed trying to get a percent of PM's completed per machine. I have a form with a text box and control source set to: = SELECT Avg(Forms![frm1]![Expr2]), Forms![frm1]![Machine] FROM Forms![frm1] WHERE (((Forms![frm1]![Machine])="EMLK Blue"));
but I get syntax of the subquery in this expression is incorrect. I'm pretty new to all of this so I'm not sure what I'm doing wrong.
Now, I can just set it to =avg(expr2) and then filter by machine and that works but my end goal is to have another form that lists every machine once with it's percent PM's completed next to it and I pretty much have it set up to list every PM the machine has and if it is up to date to equal 1 otherwise equal 0 and then I'm just trying to average that out which gives me percent of PMs up to date.
EX: customer1 order1 amount1
customer1 order2 amount2
customer2 order3 amount3
customer1 order4 amount4
say all of that information is in a query and I want to average each customer's total amount, so essentially take row 1 and 2 and 4, average the amount and take row 3 and average the amount. Is this possible?
Right now I'm just trying to get it to average just one set of rows but instead of customers I'm using machines and PM's completed trying to get a percent of PM's completed per machine. I have a form with a text box and control source set to: = SELECT Avg(Forms![frm1]![Expr2]), Forms![frm1]![Machine] FROM Forms![frm1] WHERE (((Forms![frm1]![Machine])="EMLK Blue"));
but I get syntax of the subquery in this expression is incorrect. I'm pretty new to all of this so I'm not sure what I'm doing wrong.
Now, I can just set it to =avg(expr2) and then filter by machine and that works but my end goal is to have another form that lists every machine once with it's percent PM's completed next to it and I pretty much have it set up to list every PM the machine has and if it is up to date to equal 1 otherwise equal 0 and then I'm just trying to average that out which gives me percent of PMs up to date.
Last edited: