How to group by columns with sub total and grand total

Hello Guys,
I am quite new to Metabase solution. Metabase looks powerful data visualization. I love it so much, but I could not find a feature which allows me to group by my records. Does metabase have that feature like SQL reporting service ? For example, I want to show product name and then sum up product quantity by sale officer. Data looks like this

Sale Officer Product Name Qty
ABC Product 1 10
Product 2 30

Sub total 40
ABD Product 3 10
Product 2 30

Sub total 40

Grand Total 80

Thanks for your help.

Let me suggest you do it by building it as two separate pieces (questions) and combine them in a dashboard:

  • Start the dashboard by asking the easiest Grand Total Question, save it, then - when prompted - accept to add it to a dashboard and save that.

  • In the dashboard “dive back into” the total question by clicking its text, then in the Query Builder bar simply Group by sales officer. Save - but give it a new name, add it to the existing dashboard, save.

To read up on summing and grouping (by sales officer, then product) you will want to dive into this section of the user guide:

It is on purpose I gave the steps above in a bit vague way. I hope that helps to learn more by trying things. :slight_smile:

Oh yes, and I know, you were probably asking where to find a subtotal AND total sheet function. It’s still not implemented - yet, but has been requested in a few ways, for example or … which you can :+1: vote for over on GitHub.

Please tell if that gave a useful answer - otherwise just ask. There are other ways …

Thanks Jornh for your help. Sound a bit complicate and I have not achieved it yet. :slight_smile:

@lbuntha - Oh well, as long as you keep trying - first doing some simple things - I’m sure you will learn stuff along the way :+1:.

I just put up a screenshot in my answer to I am implementing this table,after apply pivot I get this form. How can I add “Total” columns which is going to calculate the sum of all counts … a somewhat similar question to your’s …

Hope that may lead you a bit on the way. If you’re still completely lost I may consider doing a video walkthrough redoing the step I did to build that dashboard …