Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hello,
I’m attempting to load CSV files from a directory and would like to add an index to each of them, which would allow me to track error coordinates in the source data.
After reading the directory, I tried the following:
= Table.TransformColumns(Source, {"Content", each Table.AddIndexColumn(Csv.Document(_), "Index", 1, 1)})
This does add an index, but it seems that ‘Csv.Document(_)’ converts the binary form into a list with comma separators and places each line into a single ‘cell’. This transformation results in numerous errors in the data.
Is there a method to index these CSV files while maintaining their binary form?
Thanks a lot,
Jarek
Solved! Go to Solution.
Is there a method to index these CSV files while maintaining their binary form?
No. At the very minimum you need to split the binary by the row delimiter (for example LF), inject the index column, and then reassemble the binary. Although at that point you might as well fully decode the files and load them into Power BI.
Is there a method to index these CSV files while maintaining their binary form?
No. At the very minimum you need to split the binary by the row delimiter (for example LF), inject the index column, and then reassemble the binary. Although at that point you might as well fully decode the files and load them into Power BI.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
15 | |
11 | |
8 | |
8 | |
7 |
User | Count |
---|---|
15 | |
13 | |
9 | |
7 | |
6 |