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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
Anonymous
Not applicable

Need to retain multiple spaces between 2 words as is from database

I am loading the data into BI from database through DB2 - ODBC connection . I can see spaces between words is getting automatically trimmed and by default it is coming as only 1 space for any data as below 

Data in DB :

 

blokesh23_0-1647953397480.png

 

Data in Power BI

blokesh23_1-1647953464510.png

Any suggestions to fix this ?

Thanks

4 REPLIES 4
Whitewater100
Solution Sage
Solution Sage

Hi:

Yes if you are in Power Query (transform data). From "HOME"

Click on the column and choose Split Column and you can add a delimiter like choosing a space.

Whitewater100_0-1647953926016.pngWhitewater100_1-1647953960159.png

 

Hi:

I didn't complete my response, sorry.

So do what I suggested. Then under TRANSFORM choose Merge Columns. Then choose Custom for delimiter.

When you put it in just hit your space bad 2X, for the double space you want to maintain.

Rename column from Merged back to the name you want. (F2 for renamimg column).

 

Here's a screenshot, where I added an extra space..

Whitewater100_0-1647958732429.png

 

Anonymous
Not applicable

HI,

Thanks for your reponse, but unfortunately this will not work in my case . 
As I mentioned in the sample number of spaces between is not same for each row . 

Anonymous
Not applicable

HI ,

 

I dont want to split the column into multiple columns , I want the data to be in one column as is in database.

The above suggestion is splitting the column into multiple.

Thanks

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.