We have a dimension PRODUCT_TYPE_CODE and based on this, an Expression field is calculated. The calculated field is then used as a dimension to join in another Data Source.
I can see the data from this Data Source in the UI, but when I try to request this data, either in a filter in the UI or in a logic, I get an error saying that PRODUCT_TYPE_CODE cannot be found.
Correct. This is a known gap in the application. When an expression is used as a key for joining another table, the data from that table is shown in the UI but it cannot be used for filtering and fetching that data from a logic.
Here is a visualization of the unsupported scenario:
Workaround: Create a Data Load to calculate and store this key in the Datamart.