Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
I'm trying to export a data table out to csv file using the R script.
But run into the following error. I have converted all the date to type date in the query. Not sure what I've done wrong here.
DataSource.Error: ADO.NET: An unexpected error occurred while processing the R script. Please contact Power BI support. Error details: [DataFormat.Error] We couldn't parse the input provided as a Date value. Details: DataSourceKind=R DataSourcePath=R Message=An unexpected error occurred while processing the R script. Please contact Power BI support. Error details: [DataFormat.Error] We couldn't parse the input provided as a Date value. ErrorCode=-2147467259 ExceptionType=Microsoft.PowerBI.Radio.RUnexpectedException
Solved! Go to Solution.
I manged to fix this error and export all the files through R script. I knew that there is an error in the data imported and processed using power query, so what I did I imported the original data and did the same process using power query in excel not power BI, then loaded the query to PowerPivot and it loaded the data but shown error notice on power query and when I examined what causing the error. It was a couple of rows containing text in a column I changed to numbers, therefore, error will be shown.
It seems PowerPivot can handle this and load the data with these errors, however, if you want to export using R script you need to make sure your data don't contain any error and it will work fine, at least with me.
Good luck.
@qshngv As error suggests maybe it is something do to with the date column in your dataset. To test out the approach can you exclude date columns from your dataset to be converted to R data frame. So when you click on R Visuals and select columns from your dataset it creates R dataframe. Exclude all date columns in that and then try R csv output.
We couldn't parse the input provided as a Date value.
I'm having the same problem , where I can export some files and some I get the same error message.
could any one help
Thank you
I manged to fix this error and export all the files through R script. I knew that there is an error in the data imported and processed using power query, so what I did I imported the original data and did the same process using power query in excel not power BI, then loaded the query to PowerPivot and it loaded the data but shown error notice on power query and when I examined what causing the error. It was a couple of rows containing text in a column I changed to numbers, therefore, error will be shown.
It seems PowerPivot can handle this and load the data with these errors, however, if you want to export using R script you need to make sure your data don't contain any error and it will work fine, at least with me.
Good luck.
Thank you FahadFx. I see, I do have errors shown in the PowerPivot data model in Excel. Didn't know that this will prevent the export. Thanks a lot!
The problem:
The File headers from the CSVs that were inserted during the data load of the folder.
Solution:
- Before converting the date to data type date do the following
- Go to Country column
- Apply Filter and filter out -deselect- the "Country" option.
- Go on with the date conversion to Data Type date and the rest of the exercise
Problem solved!
Make sure you follow the guidelines posted in this article to export the data into CSV using R.
http://www.thebiccountant.com/2015/12/28/how-to-export-data-from-power-bi-and-power-query/
Thanks & Regards,
Bhavesh
Thanks Bhavesh, I did found this article and took a while to figure out the exact place to execute the R script.
And I have exported two other data models successufully. However, I am running into the above mentioned error in the new data set. I'm not sure what had went wrong.
If you can post your file, I will have a look and can suggest you a solution.
Thanks & Regards,
Bhavesh
User | Count |
---|---|
98 | |
90 | |
78 | |
72 | |
65 |
User | Count |
---|---|
114 | |
98 | |
96 | |
68 | |
67 |