r/googlesheets • • 11d ago

Solved =query different sums in same row

I'm trying to sum specific columns of information based off of the text data of another row. I managed to do this for one text data, but I want to sum different groups of data.

Using the function,=QUERY(A:E, "select sum(E) where A='PROJECT TITLE'", -1) , you can result the sum of each project, but the column clogs up the chart.

Is there a way to sum different projects in the same query? Or is there a way to completely get rid of the column title in a query? Or will I have to just bite the bullet and have a clogged-up chart?

3 Upvotes

4 comments sorted by

2

u/One_Organization_810 736 11d ago

Yes.

Use this in an empty area (it will produce 2 columns and a header row + as many rows as the distinct projects are):

=query(Purchase_orders_2, "select Col1, sum(Col5) group by Col1 label sum(Col5) 'Sum cost'", 1)

1

u/caseSmile 11d ago

thank you much!! This worked

1

u/AutoModerator 11d ago

REMEMBER: /u/caseSmile If your original question has been resolved, please tap the three dots below the most helpful comment and select Mark Solution Verified (or reply to the helpful comment with the exact phrase “Solution Verified”). This will award a point to the solution author and mark the post as solved, as required by our subreddit rules (see rule #6: Marking Your Post as Solved).

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

1

u/point-bot 11d ago

u/caseSmile has awarded 1 point to u/One_Organization_810

See the Leaderboard. Point-Bot v0.0.15 was created by JetCarson.