How to change decimal point to percentage in a pie chart,I didn't find the settings button
I find the field type of num is category, but the raw data is interger. How can I change the field type in metabase?
Why Metabse will change the filed type automatically ?which result in all pie charts to display abnormally.
leeloo
June 19, 2024, 9:41pm
2
You can change the field type for the column in "Admin Settings -> Table Metadata", choose the table you want and then modify the "Type" for the field in question. Once you update it the "Type" should be sticky.
I believe what you're seeing is this behavior where Metabase assumes the "Category" type for columns with low cardinality:
opened 10:45PM - 13 Sep 23 UTC
Type:Bug
Priority:P3
Administration/Metadata & Sync
.Backend
.Team/QueryProcessor
### Describe the bug
I have an integer field, Run Atttempt, that Metabase autom… atically set to Category due to low cardinality. As a category, you can't filter it like a number (e.g. values > 2). For this table, there is also a model created for it, so to fix it for the table and the model, it took 3 steps:
1. Change type to Quantity in Table Metadata
2. Change filtering to "plain input box" in the field's setting page (from display all values). Now filtering for value works for table, but not model yet.
3. Edit model's metadata and change field's type to Quantity. Normally, most changes in table metadata gets inherited by model and can be updated by editing the model and doing a refresh of the page (without having to save), however that didn't work.
### To Reproduce
1. Create int field with low cardinality where Metabase will auto assign the Category type
2. Create model for the table
3. Now try to filter for value is greater than 2. It shows a list of all values instead and no greater than operand.
4. Now follow steps in description to fix type.
### Expected behavior
It should never assign Category to number fields. If done, then it should be easy to revert by setting to Quantity in table metadata only (without any other changes)
### Logs
n/a
### Information about your Metabase installation
```JSON
{
"browser-info": {
"language": "en-US",
"platform": "MacIntel",
"userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.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.20.1+1",
"java.vendor": "Eclipse Adoptium",
"java.vendor.url": "https://adoptium.net/",
"java.version": "11.0.20.1",
"java.vm.name": "OpenJDK 64-Bit Server VM",
"java.vm.version": "11.0.20.1+1",
"os.name": "Linux",
"os.version": "5.10.186-179.751.amzn2.x86_64",
"user.language": "en",
"user.timezone": "GMT"
},
"metabase-info": {
"databases": [
"druid",
"redshift",
"mysql",
"postgres",
"bigquery-cloud-sdk",
"mongo",
"h2",
"snowflake"
],
"hosting-env": "unknown",
"application-database": "postgres",
"application-database-details": {
"database": {
"name": "PostgreSQL",
"version": "14.7"
},
"jdbc-driver": {
"name": "PostgreSQL JDBC Driver",
"version": "42.6.0"
}
},
"run-mode": "prod",
"version": {
"date": "2023-09-13",
"tag": "vUNKNOWN",
"branch": "master",
"hash": "e4058ae"
},
"settings": {
"report-timezone": "US/Pacific"
}
}
}
```
### Severity
normal as it's kinda hard to fix once it happens (especially if you are new) but doesn't happen that often
### Additional context
_No response_
Please let me know if this resolves your issue.