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
Anonymous
Not applicable

Keep leading zeros when importing from folder?

Hi,

 

I am importing many .csv files from a folder at once. There is one column that has leading zeros and I am losing them even when I change column to text. Do I have to manually load each one and merge? 

 

Not sure if there is another way to do this, but i just clicked on the double drop down arrows next to content to auto merge them.

1 ACCEPTED SOLUTION

@Anonymous

 

Another solution would be:

 

Just modify this: Change the type from Int64 to text in this Query;

 

otherway.png




Lima - Peru

View solution in original post

7 REPLIES 7
Vvelarde
Community Champion
Community Champion

hi @Anonymous

 

Try this, Select Data Type Detection: Do not detect data types

 

img1.png

After that, select first row as header and apply a filter (The other headers from csvs)

 

Filt.png

 




Lima - Peru

@Anonymous

 

Another solution would be:

 

Just modify this: Change the type from Int64 to text in this Query;

 

otherway.png




Lima - Peru
Anonymous
Not applicable

@Vvelarde

 

Thank you! Worked like a charm!

Anonymous
Not applicable

@Vvelarde

 

Can you show me the steps of how to get to that point you're showing? I use the drop down arrow next to content and it automatically "Invokes Custom Function" and everything is merged. 

@Anonymous

 

Hi, please follow the steps in this video, i think is a faster solution than previous.

 




Lima - Peru
Anonymous
Not applicable

@Vvelarde

 

Strange, when I click on the dropdown I didn't get the CSV popup box where he changed it to semicolon delimiter. Skipped that step

@Anonymous

 

I think is my regional configuration, my separator is semicolon. If use a comma in CSV that window don't appear.




Lima - Peru

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.