Summary
In an AI/BI Dashboard with a semantic model, selecting a row in a table widget cross-filters a related table through the relationship. This works for normal values. When the selected row has a text value containing a carriage return followed by a line feed (CRLF), the related table returns no rows, even though matching data exists. Values with only CR or only LF filter correctly.
Steps to reproduce
- Create a dashboard with two datasets defined as metric views:
# Id and Title
version: '1.1'
source: |-
SELECT 1 AS id, 'Alpha' AS title
UNION ALL SELECT 2, 'Beta'
UNION ALL SELECT 3, 'Gamma'
dimensions:
- name: id
expr: id
- name: title
expr: title
# Id and Comments
version: '1.1'
source: |-
SELECT 1 AS id, 'Plain single-line comment' AS comments
UNION ALL SELECT 2, concat('First line of the comment', chr(13), chr(10), 'Second line after the carriage return and newline')
UNION ALL SELECT 3, 'Another single-line comment'
dimensions:
- name: id
expr: id
- name: comments
expr: comments
- Add a one-to-many relationship from Id and Comments to Id and Title, on `Id and Comments.id = Id and Title.id`.
- Add table widget โParentโ on Id and Comments: id, comments.
- Add table widget โChildโ on Id and Title: id, title.
- Click row 1 or 3 in Parent. Child filters to the matching row.
- Click row 2 (the comment contains CRLF). Child returns no rows.
Expected behavior
Selecting row 2 filters Child to id 2 (Beta), the same as for the other rows.
Actual behavior
Child returns no rows. The generated visualization query applies this filter in the metric view:
filter: "(`Id_and_Comments_SQL`.`id` IN (2) AND `Id_and_Comments_SQL`.`comments` IN ('First line of the comment\r\nSecond line after the carriage return and newline')) AND (...same condition repeated...)"
The filter on comments does not match the stored value.
Additional observations
- If the value contains only CR (chr(13)) or only LF (chr(10)), the cross-filter works. It only fails when both appear together as CRLF.
- The filter condition appears twice in the generated query.
Impact
Text columns from source systems (e.g. comments or descriptions from ERP data) often contain CRLF line breaks. Clicking such a row shows an empty related table, which looks like thereโs no related data rather than a filter failure.
Workaround
Remove line breaks in the dataset, e.g. `translate(comments, chr(13) || chr(10), ' ')`.
Environment
Databricks AI/BI Dashboards with metric view datasets and a semantic model relationship.