Forum Discussion
csv file column count parameter issue with tab / semicolon separator
- 1 year ago
Hi Goodkat ,
The question about your files and when you remove the column numbers is related with the first row of your file.
In the TAB one you have the 2025 being in the end of the line with a tabe for each of the columns. Not sure if it's visible on this image but you can check the indentation on the first line:
So it does not matter if you have the number of columns or not because there are the correct number of separators in the first line. If you delete all the tabs in the first row you will see that the final result will be a single column:
When you get to the semicolon this is not what is happening:
You can see that there is only a semicolon in the first row so it splits by 2 when you remove the column number.
In both cases if you want to make sure you have the correct number of columns you must:
- Connect to the CSV
- Select a separator that is not on the file
- Remove the top 2 rows
- Split columns by delimiter
- Promote headers
Be aware that this option will also hard code the number of columns because of the column names that will be hard coded into that specific function. You can try and write some specific function to get a dynamic number of columns based on the number of semicolon or tab or whatever other separator.
Hello Goodkat,
Thank you for reaching out to the Microsoft Fabric Forum Community.
The issue with your semicolon-separated CSV file, where only 2 of 11 columns are detected after removing the hardcoded column count, is likely due to Power Query misinterpreting the semicolon delimiter, possibly influenced by regional settings or file encoding.
To resolve this, modify your query to explicitly set the delimiter to a semicolon and use UTF-8 encoding in the Power Query Editor’s import settings. Ensure the column count parameter is removed to allow dynamic detection of all 11 columns, like your tab-separated file and FYI, the csv file you shared was empty.
If this information is helpful, please “Accept as solution” and give a "kudos" to assist other community members in resolving similar issues more efficiently.
Thank you.