Filter field value disapeared

Dear Metabase community,

I have a dashboard with filters.
One filter is a text with a default value.
When I select a different value, dashboard is refreshed, no problem.
But when I try to select the default value, it has disappeared.
The only solution is to refresh the complete page (F5 or Ctrl+R in Chrome).

{
"browser-info": {
"language": "en-US",
"platform": "Win32",
"userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36",
"vendor": "Google Inc."
},
"system-info": {
"file.encoding": "Cp1252",
"java.runtime.name": "OpenJDK Runtime Environment",
"java.runtime.version": "17.0.3+7",
"java.vendor": "Eclipse Adoptium",
"java.vendor.url": "https://adoptium.net/",
"java.version": "17.0.3",
"java.vm.name": "OpenJDK 64-Bit Server VM",
"java.vm.version": "17.0.3+7",
"os.name": "Windows Server 2016",
"os.version": "10.0",
"user.language": "en",
"user.timezone": "Europe/Paris"
},
"metabase-info": {
"databases": [
"mysql",
"sqlserver",
"sqlite",
"postgres",
"googleanalytics",
"h2"
],
"hosting-env": "unknown",
"application-database": "postgres",
"application-database-details": {
"database": {
"name": "PostgreSQL",
"version": "12.2"
},
"jdbc-driver": {
"name": "PostgreSQL JDBC Driver",
"version": "42.4.1"
}
},
"run-mode": "prod",
"version": {
"date": "2022-08-16",
"tag": "v0.44.1",
"branch": "release-x.44.x",
"hash": "112f5aa"
},
"settings": {
"report-timezone": "Europe/Paris"
}
}
}

Best regards
Nicolas

Hi @nico8
I don't think I understand. Try providing steps-to-reproducing with Sample Database or include screenshots/video, so it's possible to understand what the problem is.

Example with sample Database to explain :

Dashboard with default value "Doohickey" selected.

Go to filter and unselect "Doohickey" and select "Gadget", Update filter:

image

Everything is ok, Dashboard is refreshed.
Then I want to select "Doohickey", but it has disapeared:

image

Of course, with Sample Database is it working, but with my Dataset is not working.

@nico8 You can set a default value, which might not exist in the database, so that would not be displayed as option in dropdowns.
Try rescanning the field for values: https://www.metabase.com/docs/latest/troubleshooting-guide/filters#are-you-seeing-a-different-kind-of-input-widget-than-you-expected
Or make a query to see if the value even exists in the database field.

Great ! But nope.
It works yesterday, but this morning the field filter value 1.Ajourdhui disapeared

image

image

image

Maybe it is linked to "By default, Metabase does a lightweight hourly sync and an intensive daily scan of field values. If you have a large database, turn this on to make changes." ?

@nico8
Make a query against your column to make sure that the value actually exists in your database:
select mycol from mytable group by mycol

I confirm that the value actually exsists in the database :

@nico8 Okay, then check the Metabase application database table metabase_fieldvalues to see if a scan has dropped the value. And then do another scan of the field.

I have set up a hourly Pulse on the field values.
I confirm that the value was present yesterday but this morning at 6am Paris time the value has disapeared !
So I am conviced that there is a link with "By default, Metabase does a lightweight hourly sync and an intensive daily scan of field values. If you have a large database, turn this on to make changes."

@nico8 Yes, Metabase makes a scan every day by default:
https://www.metabase.com/docs/latest/databases/connecting#syncing-and-scanning-databases
But something is off, since it now has a 0.Choix periode value, which wasn't there before.
If you database doesn't have these values, when Metabase scans for values, then that's the problem

  • either disable scan, so you control when it occurs
  • or make sure that scanning is done at a time, when the values are available in your database.

Read this for more information on how analysis works: https://www.metabase.com/docs/latest/troubleshooting-guide/sync-fingerprint-scan

I add "0.Choix periode" to determine if it was a problem with the number of field value.
But nothing change
This morning :


and after Metabase refresh, at 6am Paris time

In fact, I think I found the solution.
To be continued... tomorrow

So, I confirm that the problem was:

  • or make sure that scanning is done at a time, when the values are available in your database.

Thanks flamber