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
KimConcremat
New Member

How do i detect Alt + Enter at the end of the Cell?

Hey everyone, a little help here 😅

I need to identify the "Alt+Enter" at the end of each cell, but Power Query automatically removes it whenever i do a Query, i don't want to remove it, i need the data without modifications.

I need it to do a Check of data integrity from 2 different db's, because one of the sources may have sometimes a "Alt +Enter" at the end of the cell...

i need the "Check" column from the example bellow, anywhere, but i need it working, in Power Query or Power Pivot or in a measure etc.

Basically this is an "Transformation" stage from an "ETL", maybe another software could do it better than inside Power BI, but right now i need it inside Power BI.
Example:

Description (Source A)Description (Source B)Check ( 'Source A' = 'Source B')
slurry pumps

slurry pumps

 

=[Description (Source A)] = [Description (Source B)]
waste management

waste management

 

 

 

Thanks in advance!

1 ACCEPTED SOLUTION
BA_Pete
Super User
Super User

Hi @KimConcremat ,

 

I can't replicate your issue - my Power Query identifies that a value with 'Alt+Enter' (carriage return) on the end does not match the same value without it, although this is after I've forced the carriage return into the data.

However, here's some things you can try to assist in your scenario:

 

Make sure you select the following option to force PQ to display whitespace and newline characters:

BA_Pete_0-1636535585928.png

 

If this helps to be able to see the carriage returns, you can then manage them using the #(cr) code to, for example, replace them with something more visible:

BA_Pete_2-1636535815307.png

Note here I've used the advanced options, checked 'Replace using special characters', and selected 'Carriage Return' from the dropdown to populate the 'Value To Find' field.

 

The above operation changes this:

BA_Pete_3-1636536000579.png

to this:

BA_Pete_4-1636536097670.png

making them far more visible.

 

Be mindful that you may need to perform the same replace operation for Line Feeds ( #(lf) ) as well, as they will essentially appear the same in PQ, but are, of course, different.

 

Pete



Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!




View solution in original post

1 REPLY 1
BA_Pete
Super User
Super User

Hi @KimConcremat ,

 

I can't replicate your issue - my Power Query identifies that a value with 'Alt+Enter' (carriage return) on the end does not match the same value without it, although this is after I've forced the carriage return into the data.

However, here's some things you can try to assist in your scenario:

 

Make sure you select the following option to force PQ to display whitespace and newline characters:

BA_Pete_0-1636535585928.png

 

If this helps to be able to see the carriage returns, you can then manage them using the #(cr) code to, for example, replace them with something more visible:

BA_Pete_2-1636535815307.png

Note here I've used the advanced options, checked 'Replace using special characters', and selected 'Carriage Return' from the dropdown to populate the 'Value To Find' field.

 

The above operation changes this:

BA_Pete_3-1636536000579.png

to this:

BA_Pete_4-1636536097670.png

making them far more visible.

 

Be mindful that you may need to perform the same replace operation for Line Feeds ( #(lf) ) as well, as they will essentially appear the same in PQ, but are, of course, different.

 

Pete



Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!




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.

Top Solution Authors
Top Kudoed Authors