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
ggzmorsh
Helper II
Helper II

Connecting to a folder with CSV files without separating commas

Before creating a thread I have tried searching for previous threads that have been solved and none of them seems to fit to what i am having trouble with.

 

Simply i need to add a data source folder that contains csv files and connect them to power bi. The problem is however power bi is splitting all commas(default delimiter for csv) which makes all columns have commas split into parts. An example of this would look like

NameAgeBlood TypeAddress
Frank21O#2, someaddress, some city
Jonathan22B-antartica

 

 

And power bi will split them to

NameAgeBlood TypeAddress
Frank21O#2
someaddress   
some city   
Jonathan22B-antartica

 

What do i need to do? Some of the solutions from different threads are from 3 years ago, and some steps do not work anymore.

3 REPLIES 3
mussaenda
Super User
Super User

@ggzmorsh,

 

you can set it before loading the csv on power bi,

 

You can choose which delimiter you are going to choose and there is also a preview of the data after choosing the delimiter you need

 

amitchandak
Super User
Super User

If you exporting it from some source then you can force the string to be enclosed in " or can use tab-delimited.

changing the delimiter to something else combines all columns into one

 

Column1

Name,Age,Blood Type,Address
Frank,21,O,"#2, someaddress, some city"
Jonathan,22,B-,antartica

 

Then i still need to separate them based on the delimiter commas. It would look like this now.

NameAgeBlood TypeAddress
Frank21O#2, someaddress, some city
Jonathan22B-antartica

 

Which yes, solves this problem IF we are talking about one file. If the data source contains more than one combining them also includes the headers and when you split them makes the problem worse.

 

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.