cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Shelley
Continued Contributor
Continued Contributor

How to add a line break in a text concatenation

I'm trying to add a line break in a concatenated text strong and have tried

<br/>

"<br/>"

UNICHAR(10)

and cannot get it to work. Does anyone know how?

Here's the expression:
Last Refresh =
CONCATENATE("Last Refresh: " & FORMAT (MAX('Last Refresh Local Time'[Last Refresh Local Time]), "mm/dd/yyyy at HH:MM:SS")
    &  UNICHAR(10) &
"Latest Service Ticket: ", FORMAT(MAX('ServiceTicket'[Create Date]), "Short Date"))

 

This results in:

Last Refresh: 03/22/2018 at 13:54:12 Latest Service Ticket: 3/21/2018

 

I want:

Last Refresh: 03/22/2018 at 13:54:12
Latest Service Ticket: 3/21/2018

 

Thanks for any help!

1 ACCEPTED SOLUTION
Shelley
Continued Contributor
Continued Contributor

I finally figured this out! The formula I had was correct.

 

Last Refresh =

CONCATENATE("Last Refresh: " & FORMAT (MAX('Last Refresh Local Time'[Last Refresh Local Time]), "mm/dd/yyyy at HH:MM:SS")
    &  UNICHAR(10) &
"Latest Service Ticket: ", FORMAT(MAX('ServiceTicket'[Create Date]), "Short Date"))

 

However, in order to have it work, I had to go to the paint roller (format) section and turn Word Wrap ON.

View solution in original post

6 REPLIES 6
joglidden2
Helper V
Helper V

Just to add to this thread, if using this (mad genius) technique in an x-measure, you just put in UNICHAR(10) in the delimiter field, as in, 

_IP_Values = CONCATENATEX(VALUES(collector_view[IP]), collector_view[IP], UNICHAR(10)). 
It works!
Velkins
Frequent Visitor

X=
CONCATENATE(CONCATENATE('Table'[Column 1], "
"),
'Table'[Column 2])
Shelley
Continued Contributor
Continued Contributor

I finally figured this out! The formula I had was correct.

 

Last Refresh =

CONCATENATE("Last Refresh: " & FORMAT (MAX('Last Refresh Local Time'[Last Refresh Local Time]), "mm/dd/yyyy at HH:MM:SS")
    &  UNICHAR(10) &
"Latest Service Ticket: ", FORMAT(MAX('ServiceTicket'[Create Date]), "Short Date"))

 

However, in order to have it work, I had to go to the paint roller (format) section and turn Word Wrap ON.

Hi @Shelley ,

 

Where were you using this data? 

 

Being able to use a linebreak like this would be useful for me too, but I'm trying to use it on a column which I'm using for an x axis for a visualisation.

 

I couldnt see a word wrap option for the x axis 😕

Shelley
Continued Contributor
Continued Contributor

@CYParker I think it was in a Card visual.

Hi @Shelley,

 

Thanks for getting back to me and sharing what you learnt. 

 

I was trying to get it to work for use in an X axis on a graph but it doesnt seem to work for that.

 

 

Helpful resources

Announcements
collabdays lisbon

CollabDays Lisbon - 26 November 2022

Sessions include practical, hands-on experience that will help you take the next step in your career and know-how.

Difinity Conference

Difinity Conference 2022

Difinity is the largest Microsoft Data, AI, Power BI, Power Platform and Business Applications Conference in New Zealand.

European Share Point Conference

European Share Point Conference

This conference returns live and in-person in Copenhagen this 28 November-01 December with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Microsoft 365 Conference â__ December 6-8, 2022

Microsoft 365 Conference - 06-08 December

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.