Hi @Sergi_Martinez -
Lookup fields use the MongoDB $lookup aggregation stage under the covers, and this does a strict equality check against the field values, so a string and an Object ID will never match.
There are a couple of directions you could consider:
- Convert the field type in the parent collection prior to the Lookup being performed. You can’t use the Charts “Convert Type” in this case, as we decided to allow type conversions after lookups but not the reverse. But you could do the same in the query bar using a query like
[{$set: { fieldName: { $toString: '$fieldName' } } }] - Rather than use the Lookup Field feature in the chart builder, add a pipeline to the data source that uses the advanced syntax of
$lookupthat allows you to specify custom join conditions.
Let me know if either of these work.
Tom