Problems with variable in SQL question

Diagnostic Info

“browser-info”: {
“language”: “en-US”,
“platform”: “Linux x86_64”,
“userAgent”: “Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.97 Safari/537.36”,
“vendor”: “Google Inc.”
“system-info”: {
“file.encoding”: “UTF-8”,
“”: “OpenJDK Runtime Environment”,
“java.runtime.version”: “11.0.7+10-post-Ubuntu-2ubuntu218.04”,
“java.vendor”: “Ubuntu”,
“java.vendor.url”: “”,
“java.version”: “11.0.7”,
“”: “OpenJDK 64-Bit Server VM”,
“java.vm.version”: “11.0.7+10-post-Ubuntu-2ubuntu218.04”,
“”: “Linux”,
“os.version”: “4.15.0-96-generic”,
“user.language”: “en”,
“user.timezone”: “Etc/UTC”
“metabase-info”: {
“databases”: [
“hosting-env”: “unknown”,
“application-database”: “h2”,
“application-database-details”: {
“database”: {
“name”: “H2”,
“version”: “1.4.197 (2018-03-18)”
“jdbc-driver”: {
“name”: “H2 JDBC Driver”,
“version”: “1.4.197 (2018-03-18)”
“run-mode”: “prod”,
“version”: {
“date”: “2020-07-21”,
“tag”: “v0.36.0”,
“branch”: “release-0.36.x”,
“hash”: “b31049f”
“settings”: {
“report-timezone”: “America/Sao_Paulo”

My problem!!(I will put some screenshots)

I’m trying to get the percentage of rows who have certain value. I didn’t find a way to do this using only the gui and considering the insertion of the variable value is optional, I think that using only the gui it is not possible to do that.

My variable is configured as a filter field and mapped to field customer if the same table i’m using to calculate the percentage.

So, this way the dropdown filter widget Customer show me the list of customers. But when i try to use the filter this error appears.

I’ve tried to cast the filter to character varying, and “works”, but not properly.

Sorry by the amount of prints. If you have any idea what I’m doing wrong, please tell me about it.

Hi @johhen

You cannot use Field Filters like that - read this:

Upgrade to latest release 0.36.4

And then migrate away from H2:

1 Like

thank you, works for me…