To show new lines in an SSAS tabular model attribute, you can use the following steps:
- In your SQL query, replace the "\n" characters with the appropriate new line character for your environment. For example, in SQL Server, you can use the CHAR(13) and CHAR(10) characters to represent new lines:
SELECT REPLACE(REPLACE([YourColumnName], '\n', CHAR(13)), CHAR(10), '') AS [NewColumnName]
FROM [YourTableName]
- In your SSAS tabular model, add the [NewColumnName] as a new attribute.
- In the properties of the attribute, select the "Format" option and choose "Custom".
- In the "Custom Format String" field, enter the following expression to replace the CHAR(13) character with a line break:
=[NewColumnName].Value.Replace(Chr(13), VbCrLf)
This should display the attribute with new lines instead of the "\n" characters.
hope it helped!