Page 1 of 1

[Solved] Adding field totals together

Posted: Tue Apr 04, 2017 6:38 pm
by chris_petersen
I am looking for a little direction as to where I am going wrong with this issue. I am trying to add the billable hours together for each client in my dbase but I end up with is this cryptic error.
Any help would be greatly appreciated.

Thanks.
Hours Query.JPG
Error.JPG

Re: Adding field totals together

Posted: Tue Apr 04, 2017 7:25 pm
by FJCC
You have to Group by every column that is not in the SUM; SUM is the aggregate function. If you want the sum of billable hours per Client, regardless of the Project_Number or Start_Date or any other column, then you have to drop those columns from the query. If you want the sum of billable hours for every combination of Project_Number, Start_Date, etc., then add a Group By condition to those columns as you did to Client.

Re: Adding field totals together

Posted: Tue Apr 04, 2017 7:30 pm
by Sliderule
Please see the link below, and, carefully read the Explanation(s) given:

viewtopic.php?f=61&t=80832&p=372728

I hope this helps, please be sure to let me / us know.

Sliderule

Thanks to add [Solved] in your 1st post Subject (edit button top right) if this issue has been resolved.

Re: Adding field totals together

Posted: Wed Apr 05, 2017 4:16 pm
by chris_petersen
I probably gave the wrong description to this post. What I actually was looking for was a way to take any jobs from one client and give me a grand total of billable hours for that client.
After reading all of the info in the manuals and forums, I don't think that it works that way. I will probably end up exporting to a spreadsheet and total them up from there.
I did find the report navigator extension today but it seems to have the same issue.

FJCC, you did solve the error that I was having though. Thanks for that.
Hours.JPG
Query.JPG

Re: Adding field totals together

Posted: Wed Apr 05, 2017 4:32 pm
by Sliderule
chris_petersen wrote:I probably gave the wrong description to this post. What I actually was looking for was a way to take any jobs from one client and give me a grand total of billable hours for that client.
Per your description ( and my instructions on the link I gave you ) . . . REMOVE . . . the check marks on all columns EXCEPT for:
  1. Client
  2. Billed_Hours
Explanation: This will return, for the given Client , a sum of all Billed_Hours.

I hope this helps, please be sure to let me / us know.

Sliderule

Thanks to add [Solved] in your 1st post Subject (edit button top right) if this issue has been resolved.

Re: Adding field totals together

Posted: Wed Apr 05, 2017 7:38 pm
by chris_petersen
Thanks for trying Slidrule. I appreciate the help.

Not exactly what I was thinking it would do.
No worries, I will keep playing with the wizard and design view to see if I can figure out something.
If worse comes to worse, I will export the column out and run it through a spreadsheet.
They probably won't use that function much anyway unless they need hours for a budget or something.

Chris

Re: Adding field totals together

Posted: Wed Apr 05, 2017 9:22 pm
by chris_petersen
Hi Sliderule,

I re-created the query from scratch rather than modify the existing one with the info you provided and it works now. It looks the same as the other but it works this time. I must have had something hidden or a bad field.
I have no idea. I wanted to thank you for the help. Below is what I ended up with. It gives me the total hours between two dates. I will probably add the dates to the report.

Chris
Query.JPG
Hours.JPG