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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
john121
Frequent Visitor

Folder wise CSV file record counts

I have 3 folders- India ,Germany and US. Each folder contains multiples files.

I have to give the Folder wise total record count.

For eg: India has 3 files - File1 has 5 rows,File2 has 6 rows and File3 has 3 rows, Then Total record count for India would be 14.

 

Now the Problem is when files are in .xlsx format and using excel.workbook function and then Table.columncount function I get the 

counts which works fine.

But when there are .csv files I get the error - DataFormat.Error: External table is not in the expected format.

Let me know how can i do this for .csv files.

 

Thanks!

 

2 ACCEPTED SOLUTIONS
v-yadongf-msft
Community Support
Community Support

Hi @john121 ,

 

Please try:

Csv.Document([Content])

vyadongfmsft_0-1666340667033.png

 

Best regards,

Yadong Fang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

v-yadongf-msft
Community Support
Community Support

Hi @john121 ,

 

Has your problem been solved? If solved, please consider Accept it as the solution to help the other members find it more quickly.

 

Best regards,

Yadong Fang

View solution in original post

2 REPLIES 2
v-yadongf-msft
Community Support
Community Support

Hi @john121 ,

 

Has your problem been solved? If solved, please consider Accept it as the solution to help the other members find it more quickly.

 

Best regards,

Yadong Fang

v-yadongf-msft
Community Support
Community Support

Hi @john121 ,

 

Please try:

Csv.Document([Content])

vyadongfmsft_0-1666340667033.png

 

Best regards,

Yadong Fang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 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.

Top Solution Authors