Closed
Description
Describe the bug
When a question groups values by a foreign key column and that column has Use foreign key
selected in the Display values
setting of the field settings in Table metadata
, the question will no longer correctly work when visualized as Pivot Table
.
The grand totals will be missing from the first column making them wrong on questions with multiple columns or leaving them completely empty if only a single column exists.
To Reproduce
- Open the admin
- Click on Table Metadata
- Select the Sample Database
- Select "Orders"
- Scroll to "Product ID"
- Click on the gear icon to the right
- Scroll to "Display values"
- Select "Use foreign key" > "Title"
- Create a new question
- Use "Sample Database" -> "Orders"
- Under "Summarize" select "Sum of", then "total"
- Under "pick column to group by" select "Product ID" below the "Order" heading. Take care not to use Product directly, this will not trigger the bug
- Click "row limit", Enter "3". This isn't required, but otherwise you'll have to scroll a lot to see the bug.
- Click "Visualize"
- Click "Visualization"
- Select "Pivot table"
- Observe the Grand totals row being completely empty.
Expected behavior
The total should be visible
Logs
No response
Information about your Metabase installation
{
"browser-info": {
"language": "en-US",
"platform": "Linux x86_64",
"userAgent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Safari/537.36",
"vendor": "Google Inc."
},
"system-info": {
"file.encoding": "UTF-8",
"java.runtime.name": "OpenJDK Runtime Environment",
"java.runtime.version": "11.0.24+8-post-Debian-2deb11u1",
"java.vendor": "Debian",
"java.vendor.url": "https://tracker.debian.org/openjdk-11",
"java.version": "11.0.24",
"java.vm.name": "OpenJDK 64-Bit Server VM",
"java.vm.version": "11.0.24+8-post-Debian-2deb11u1",
"os.name": "Linux",
"os.version": "5.10.0-31-amd64",
"user.language": "en",
"user.timezone": "Etc/UTC"
},
"metabase-info": {
"databases": [
"h2",
"postgres"
],
"hosting-env": "unknown",
"application-database": "postgres",
"application-database-details": {
"database": {
"name": "PostgreSQL",
"version": "15.8 (Debian 15.8-0+deb12u1)"
},
"jdbc-driver": {
"name": "PostgreSQL JDBC Driver",
"version": "42.7.3"
}
},
"run-mode": "prod",
"plan-alias": "",
"version": {
"date": "2024-08-13",
"tag": "v0.50.20",
"hash": "df82d58"
},
"settings": {
"report-timezone": null
}
}
}
Severity
blocking some users, a lot of existing pivot tables are now broken
Additional context
No response
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment