cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
wi11iamr
Advocate II
Advocate II

Replace carriage return in dataset

Hi there,

 

I have some columns in my dataset that has a large amount of text that includes a carriage return for some records.

 

Does anyone know of some interesting techniques I could try to replace the carriage return with a comma?

 

Thanks

W

1 ACCEPTED SOLUTION

@wi11iamr It would appear you can do this in the Desktop.

In the Data section, click "Edit Queries" in the ribbon.

Select the table you want, and right click the column header

Select "Replace Values", click in the "Value To Find"

Select "Advanced Options" check "Replace using special characters"

Select "Insert special character"

Click "Carriage Return" and a carriage return should show in your values section

put comma in "Replace With"

OK

Close and Apply

 

This is "in theory" as I didn't directly test it, but the sequence appears to support the action.


Looking for more Power BI tips, tricks & tools? Check out PowerBI.tips the site I co-own with Mike Carlo. Also, if you are near SE WI? Join our PUG Milwaukee Brew City PUG

View solution in original post

4 REPLIES 4

@wi11iamr It would appear you can do this in the Desktop.

In the Data section, click "Edit Queries" in the ribbon.

Select the table you want, and right click the column header

Select "Replace Values", click in the "Value To Find"

Select "Advanced Options" check "Replace using special characters"

Select "Insert special character"

Click "Carriage Return" and a carriage return should show in your values section

put comma in "Replace With"

OK

Close and Apply

 

This is "in theory" as I didn't directly test it, but the sequence appears to support the action.


Looking for more Power BI tips, tricks & tools? Check out PowerBI.tips the site I co-own with Mike Carlo. Also, if you are near SE WI? Join our PUG Milwaukee Brew City PUG

View solution in original post

Thanks Eno, the solution you propose is however unfortunately to replace characters with a carriage return. My dilemma is to replace a carriage return with a character.

@wi11iamr

 

i think @Seth_C_Bauer solution should work for replacing with a character 

below image did that when i have it for line feed and replaced it with '-'

 

Replace.PNG

After

 

Replace After.PNG

Thank you, it appears I was too hasty (and naieve) in my initial response.

 

@Seth_C_Bauer - your clarification was indeed correct, thank you.

@Sarr - thank you for taking the time to point this out to me

Helpful resources

Announcements
Power BI December 2021 Update_carousel 768x460.jpg

Check it Out!

Click here to read more about the December 2021 Updates!

User Group Leader Meeting January 768x460.png

Calling all User Group Leaders!

Don't miss the User Group Leader meetings on January, 24th & 25th, 2022.

Jan 2022 Dev Camp 768x460 copy.png

Power BI Dev Camp- January 27th, 2022

Mark your calendars and join us for our next Power BI Dev Camp!

Top Solution Authors
Top Kudoed Authors