How can I display the totals of the grouping totals in a user request?

Good day!

How can I display the totals of the grouping totals in a user request?
Analog: WITH ROLLUP in grouping.

ver MetaBase: 0.41.2

Thanks.

Hi @twinsa
You should upgrade immediately: https://github.com/metabase/metabase/releases/latest
That's currently only available in the Pivot Table, unless you do it manually in SQL:
https://www.metabase.com/docs/latest/users-guide/05-visualizing-results.html#pivot-table

I understood about the update. I will definitely update the version.

According to the answer: I don't have a pivot table involved. And I'm not writing a direct request, but a user request (see the screenshot)

Did I understand correctly that after the update I will not be able to get the totals for the grouping?

@twinsa Post "Diagnostic Info" from Admin > Troubleshooting.
You have to select the Visualization called "Pivot Table".

{
"browser-info": {
"language": "ru-RU",
"platform": "Win32",
"userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.45 Safari/537.36 OPR/82.0.4227.23",
"vendor": "Google Inc."
},
"system-info": {
"file.encoding": "UTF-8",
"java.runtime.name": "OpenJDK Runtime Environment",
"java.runtime.version": "11.0.13+8",
"java.vendor": "Eclipse Adoptium",
"java.vendor.url": "https://adoptium.net/",
"java.version": "11.0.13",
"java.vm.name": "OpenJDK 64-Bit Server VM",
"java.vm.version": "11.0.13+8",
"os.name": "Linux",
"os.version": "4.15.0-153-generic",
"user.language": "en",
"user.timezone": "GMT"
},
"metabase-info": {
"databases": [
"sqlserver"
],
"hosting-env": "unknown",
"application-database": "postgres",
"application-database-details": {
"database": {
"name": "PostgreSQL",
"version": "12.9 (Debian 12.9-1.pgdg110+1)"
},
"jdbc-driver": {
"name": "PostgreSQL JDBC Driver",
"version": "42.2.23"
}
},
"run-mode": "prod",
"version": {
"date": "2021-11-09",
"tag": "v0.41.2",
"branch": "release-x.41.x",
"hash": "ad599fd"
},
"settings": {
"report-timezone": null
}
}
}11

@twinsa You're using SQL Server as the querying database. Click it anyway, even if it is grayed out.
You'll have to remove the sorting you're doing, since that will not be supported.

Pivot tables can only be used for aggregated queries

I removed the sorting.

@twinsa Yeah, remove the custom column, which you've added after the aggregation.

1 Like

Thanks to @flamber!

After deleting the custom column, I was able to use the pivot table.
The results of the columns appeared.

But now how do I add totals by rows (a custom column that I deleted after grouping)?
That is, now I need to add one more column and totals.

Thanks!

Thanks.
I managed to figure out how to do it myself. Everything worked out...