How to Line Break in Power Query M Language, Concatenate Text with Line Break in Excel, Line break in Power Query, Line Break in Power Bi DAX
Line breaks text in Power Query M language can be an important step. When you want to show text by Line Break in a custom column by combining other column text after applying the line break. This step is a little tricky. Please find the below step-by-step tutorial.
Text.Combine is the M language function which is very similar to CONCATENATE. The CONCATENATE function is widely used in Excel and DAX to merge the text among two or multiple columns.
The Syntax of Text.Combine is :
Text.Combine(texts as list, optional separator as nullable text) as text
How to break line in Power Query
By following the same process, users can CONCATENATE with Line Break two or more Excel columns with Power Query inside Excel.
Original data format I have
If you use Test.Combine in Power Query Custom Column, it will show first row's result as below
I used to combine multiple-column data with M Query Text.Combine and apply the line break in Power Query
Step to Break Line in Power Query Custom Column
Step 1
Add Column (menu bar) > Custom Column
Text.Combine({[Week],"Job: "&[Job],"Job Description: "&[Job Description]}, "#")
Step 2
Now I am replaced the text delimiter "#" to "#(lf)" and see the magic
Text.Combine({[Week],"Job: "&[Job],"Job Description: "&[Job Description]}, "#(lf)")
Note - I am using small L, it is not capital I or small i
Please use the code and let me know if any questions or feedback you have.
COMMENTS