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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
EaglesTony
Helper V
Helper V

How do I get Carriage Return and Line Feed as a new column ?

Hi,

 

  I have a table called "Final" and the last column is "Fix Version", what I want in PowerM to add a custom column "Fix VersionwithCRLF".

 

  Example if I have "FixVersion" as "123", I want "FixVersionwithCRLF" as "123<CR><LF>" (where CR is the carraige return character and LF is the line feed character).

6 REPLIES 6
EaglesTony
Helper V
Helper V

I have this logic:

 

= Table.AddColumn(#"Removed Columns", "CRLF", each [Fix versions] & "#(cr)#(lf)")

 

Is there a way in the transform to actually see these characters, as in the transform they appear blank for this new column called "CRLF"

 

However it doesn't seem like it is outputing CRLF in my data when I output it.

 

I even tried in PowerAutomate to add decodeUriComponent('%0D%0A'), but when I loo at the file in notepad++ it just has Linefeed after each line.

 

It seems the header row doesn't capture the Carriage Return and Line Feed.

Greg_Deckler
Super User
Super User

@EaglesTony [FixVersion] & "#(cr)#(lf)"


@ 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!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

How can I validate it truly has those characters in the new column, as it shows the column as blank ?

I tried this:

= Table.AddColumn(#"Removed Columns", "FixVersionWithCRLF", each Text.Combine([Fix versions], "#(cr)#(lf)"))

 

However, the column has "Error" with the error message as:

Expression.Error: We cannot convert the value "" to type List.
Details:
Value=
Type=[Type]

Greg_Deckler
Super User
Super User

@EaglesTony I believe it is "#(cr)#(lf)"


@ 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!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

What would be the syntax to add it as a new column to tack it onto the end of "FixVersion ?

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.