Reputation: 2874
If I have a column in a table where each cell contains text, how can I push them as output into e.g. a card and separate the cells with a new line?
I have been using the CONCATENATEX
function, which takes a delimiter argument; however the standard new line character ('\n'
) doesn't work.
Upvotes: 4
Views: 36370
Reputation: 11
Substitute /n with the string "#(cr)#(lf)" to create a new line.
Upvotes: 0
Reputation: 191
In the concatenate code, if you insert a "shift + enter" after the comma, it gives me a line break, without breaking the code.
Example:
'Query1'[LetterCode],
",<Inserted SHIFT-ENTER here>
",
'Query1'[LetterCode],
Upvotes: 1
Reputation: 2874
It is possible to pass Unicode characters to the CONCATENATEX
function, using the UNICHAR(number)
function.
The number
parameter corresponds what looks to be the decimal UTF-16 or UTF-32 encodings (as shown here).
This means a new line is given by UNICHAR(10)
.
A final solution might then be: CONCATENATEX(TableName, TableName[TextColumn], UNICHAR(10))
Here is a screenshot that shows:
In the last line of the Measure code, marked yellow, you can see the use of UNICHAR(10)
as a new line separator.
If nothing were to be selected in the Slicer object (i.e. everything is selected by default - no filter is used), then "Show other text" would be displayed in the Card.
Upvotes: 8