Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
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!
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
119 | |
78 | |
58 | |
52 | |
48 |
User | Count |
---|---|
170 | |
117 | |
63 | |
58 | |
51 |