How to access a column from a Joined table in Custom Expression inside Notebook Editor

Hello! MetaBase Gurus,
My objective in the NoteBook Editor is to Summarize and Create a Custom Expression Column with the Distinct ( ) function and count the unique values with "Feed Backs → Message ID".

I have tried the following but failed:
= Distinct ("Feed Backs.Message ID")
= Distinct ([Feed Backs.Message ID])
= Distinct ("Feed Backs → Message ID")
= Distinct ([Feed Backs → Message ID])

The Attached image shows the Main Table and Joined Table. The encircled column is my desired column.


The second image may give you an idea where I wanted to make a Custom Expression using the Distinct () function. :slight_smile:

Hi @JSAIMB1000
The function name and parenthesis should not have a space in-between.
And I'm unsure why you don't just use the clickable metric "Number of distinct values of ...", which is the same as writing Distinct([Feed Backs → Message ID])

I don't know what you mean by "I have tried the following but failed:" - what failed? If there's an error, then show the error.

Also, I can see that you're not using a newer release, so please post "Diagnostic Info" from Admin > Troubleshooting.

Hi! @flamber,
Thank you for the response.

  • Even without the Space in-between, it failed, please see the image.

**The error if I use Distinct([Feed Backs → Message ID]) is "Unknown Field: Feed Backs → Message ID". Please see the attached image.


***If I use, Distinct("Feed Backs → Message ID"), I will be allowed to save the Custom Expression but will cause this error when I Preview:
"Value does not match schema: {:query {:aggregation [nil nil nil [nil (named (named [nil (named (named (not (some-matching-condition? a-java.lang.String)) "Must be a valid instance of one of these clauses: :expression, :field") "field-or-expression")] "Must be a valid instance of one of these clauses: :count, :avg, :cum-count, :cum-sum, :distinct, :stddev, :sum, :min, :max, :metric, :share, :count-where, :sum-where, :case, :median, :percentile, :var") "aggregation") nil]]}}"

**** I wanted to Customize the Title of the Column into like "# Messages with Feedbacks" instead of just "Number of distinct values of ..." which is un-editable when using the Basic Metric.

***** I will ask our admin to update into a newer release.


@JSAIMB1000 Think your problems might be fixed if you upgraded, since it might be old problems.
You should see a suggestion dropdown if you start typing this: Distinct([
And then you just select the field you want.

Hi! @flamber,
Once again thank you for the quick response. Yes, I will definitely ask our Admin to get an update. I'll get back to you with the result afterward.