Custom Expressions and foreign key fields

I notice that when defining a CUSTOM EXPRESSION in the query builder that it is not possible to link to foreign key fields.

It is possible in the normal expressions (SUM, COUNT etc) to use the foreign keys to access fields in foreign tables, and compute based on those.

But in Custom Expressions it is possible to work with only the fields in the question’s primary table. The foreign key links do not appear at the bottom of the list.

Is there a technical reason for this? Or is this an oversight?

I have been using Custom Expressions a lot recently in order to label the answer columns, which are otherwise given default names like “sum” and “sum 2” etc, when the normal expressions are used.

Metabase version: 0.25.2
Operating System: MacOS 10.12.6 (16G29)
Chrome Browser: Version 60.0.3112.113 (Official Build) (64-bit)

1 Like