Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

Reply
mjanecek
Helper I
Helper I

Carriage Return in Dax Measure Returning Concantenated Text

Hi: I'm writing a measure that will concantenate text and scalar values to form a narrative I will place in a shape's Text.

 

I want to put carriage returns to create new lines at specific points in the narrative.  Its my understanding that 10 is the chracter number that allows a line break to be inserted into a dax measure returning text when used with the UNICHAR function.

 

Below is my code, and as you can see when the measure is put into the screen shot of the visual, the text is still on one line.

 

Narrative =
 
var label =   "Retailer Parent: " & max('top Retail Parents'[Retail Parent]) & " " & UNICHAR(10)
var label2 = "My return should go above this text"
return CONCATENATE(label,label2)
 

 

 

Any Help is Appreciated.

 

 

4 REPLIES 4
Anonymous
Not applicable

Hi @mjanecek ,

 

Have you solved your problem? If so, can you share your solution here and mark the correct answer as a standard answer to help other members find it faster? Thank you very much for your kind cooperation!

 

Best Regards,

Clara Gong

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Kaviraj11
Super User
Super User

Hi, Try this  and make sure to have the Text Wrap option activated & you can adjust accordingly to your requirement. 

 

Narrative  =
var label =   "Retailer Parent: " & "ABC" & " " & UNICHAR(10)
var label2 = "My return should go above this text"
return  label & UNICHAR(10) & label2
 
Or 
 
Narrative  =
var label =   "Retailer Parent: " & "ABC" & " " & UNICHAR(10)
var label2 = "My return should go above this text"
return  CONCATENATE(CONCATENATE(label,UNICHAR(10)), label2)
 
Kaviraj11_0-1714572310237.png

 




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





This works when I put the measure into a card, but not a shape.  

 

Narrative =
var label =   "Retailer Parent: " & max('top Retail Parents'[Retail Parent]) & " " &  UNICHAR(10)
 var label2 =
" Grossed a Total of "
&  "$" & FORMAT(ROUND([Revenue or Premium Field],0),"#,###,###,###,###") & " from " & Min('Transaction Detail'[Accounting Month]) & " to " & max('Transaction Detail'[Accounting Month]) &  ".  This covers " & DISTINCTCOUNT('Transaction Detail'[Amwins Division]) & " Divisions ," & DISTINCTCOUNT('top LOBs'[LOB]) & " Lines of Business ," & DISTINCTCOUNT('top Market Parents'[Market Parent]) & " Market Parents, and" & DISTINCTCOUNT('top Retail Parents'[Retail Parent]) & "  Retail Parents"
 RETURN label & UNICHAR(10) & label2
 
I want to align the text left.  The shape allows me that option, but the card does not.  Also, if I turn off text wrap on the card, It does not work.
 

 

 

@mjanecek Unfortunately the support for carriage returns in visuals is not universal. You might have better luck with the new Preview card visual, but it's preview.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.