Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowThe Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.
Hi
I have a situation where Power BI Desktop adds an extra column upon refreshing the data. The scheduled refresh itself works great.
I have some R script in each file that looks like this:
write.csv(dataset, file="S:\[filename].csv")
When I edit the query it only shows "Name" and "Value" fields. The original csv file has 10+ columns.
When the refresh occurs I notice that an additional field is added to the beginning of my csv file. It seems to mock a row count.
For now I have to delete the files prior to doing a refresh, otherwise it will keep adding extra columns.
Has anyone else experienced this?
Solved! Go to Solution.
Your R-script causes that. Add and additional argument: row.names=FALSE to avoid it.
See here for example about further details: http://rprogramming.net/write-csv-in-r/
Imke Feldmann (The BIccountant)
If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!
How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries
If the column names you need are fixed, then in the query editor, select all the columns you need and remove other columns. That way, any new unwanted additional columns (in subsequent refreshes) are automatically removed.
Regards,
Tarun
Your R-script causes that. Add and additional argument: row.names=FALSE to avoid it.
See here for example about further details: http://rprogramming.net/write-csv-in-r/
Imke Feldmann (The BIccountant)
If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!
How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the February 2025 Power BI update to learn about new features.
User | Count |
---|---|
84 | |
81 | |
52 | |
37 | |
36 |
User | Count |
---|---|
105 | |
85 | |
48 | |
42 | |
41 |