Unknown Column Error

Hi,

I created two custom expression that sums up if x, and I want to compare the two columns and provide an out if one is more than the other.

But when creating the Custom Column if my case statement, I get the following:

Unknown column ‘source.2020’ in ‘field list’

Running on database: MySQL

Thanks
Grant

Hi @GrantCPT
Post “Diagnostic Info” from Admin > Troubleshooting.
And I don’t quite understand how you are structuring your Notebook. Can you provide a screenshot, or the full error from Admin > Troubleshooting > Logs.
It sounds like you are seeing this issue:
https://github.com/metabase/metabase/issues/12839 - upvote by clicking :+1: on the first post

Hi @flamber

Yeah, seems like I have the same issue as what is reported on the github issue.

Below is the diagnostic info if still required:

{
“browser-info”: {
“language”: “en-US”,
“platform”: “Win32”,
“userAgent”: “Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36”,
“vendor”: “Google Inc.”
},
“system-info”: {
“file.encoding”: “UTF-8”,
“java.runtime.name”: “OpenJDK Runtime Environment”,
“java.runtime.version”: “11.0.9.1+1-Ubuntu-0ubuntu1.18.04”,
“java.vendor”: “Ubuntu”,
“java.vendor.url”: “https://ubuntu.com/”,
“java.version”: “11.0.9.1”,
“java.vm.name”: “OpenJDK 64-Bit Server VM”,
“java.vm.version”: “11.0.9.1+1-Ubuntu-0ubuntu1.18.04”,
“os.name”: “Linux”,
“os.version”: “5.4.0-1030-aws”,
“user.language”: “en”,
“user.timezone”: “Etc/UTC”
},
“metabase-info”: {
“databases”: [
“h2”,
“googleanalytics”,
“postgres”,
“snowflake”,
“mysql”
],
“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-12-03”,
“tag”: “v0.37.3”,
“branch”: “release-x.37.x”,
“hash”: “2f1e783”
},
“settings”: {
“report-timezone”: null
}
}
}

@GrantCPT You should migrate away from H2 if you are using Metabase in production:
https://www.metabase.com/docs/latest/operations-guide/migrating-from-h2.html