cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

ADO.NET: Rscript error - Cannot find Dataset

Hi everyone,

 

I'm in the process of finalizing my Forecasting Dashboard, but am having trouble actually explicitly showing my forecasting values in a non-plot. I surmised that the best way to go about this was to create the forecast in R and consume it in Power BI as shown here. However, upon running my script (shown below), I'm arriving at an error that I can't work around.

 

Details: "ADO.NET: R script error.
Loading required package: zoo

Attaching package: 'zoo'

The following objects are masked from 'package:base':

as.Date, as.Date.numeric

Loading required package: timeDate
Loading required package: methods
This is forecast 7.1

 

Error: 'FinalDataR.xlsx' does not exist in current working directory ('C:/Users/rohuyn/AppData/Local/Radio/RScriptWrapper_73e9db1f-04c3-457f-b569-fd897bce5981').
Execution halted

 

Does anyone have any ideas why this would be so, considering that whenever I input that same actual dataset to create my visualizations, PowerBI works fine? The idea is to have a forecasting dashboard that would be interactive in both visualization and actual values. Open to any suggestions/comments/guidance. Additionally, my forecasting script can be found below.

 

Best,

Ronnie

 

library(readxl)
library(forecast)

FinalData <- read_excel("FinalDataR.xlsx", sheet = "Final Raw Data")

ForecastData <- aggregate(Revenue~Month, data = FinalData, FUN = sum)

GeneralForecast <- ts(ForecastData$Revenue, start = 0, freq = 12)

fit <- arima((GeneralForecast), c(1, 1, 0),seasonal = list(order = c(1, 1, 0), period = 12))

ActualForecast <- forecast.Arima(fit, h = 5)

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Champion
Community Champion

Re: ADO.NET: Rscript error - Cannot find Dataset

@rohuyn I think all you need to do is explicitly specify path of FinalDataR.xlsx instead of just the name as by default it will try to look into R directory but cannot find the file. So specify like C:/MyData/FinalDataR.xlsx and it should work.

View solution in original post

3 REPLIES 3
Highlighted
Community Champion
Community Champion

Re: ADO.NET: Rscript error - Cannot find Dataset

@rohuyn I think all you need to do is explicitly specify path of FinalDataR.xlsx instead of just the name as by default it will try to look into R directory but cannot find the file. So specify like C:/MyData/FinalDataR.xlsx and it should work.

View solution in original post

Highlighted
Frequent Visitor

Re: ADO.NET: Rscript error - Cannot find Dataset

Perfect! Thanks, ankitpatira!

 

Just to clarify, this script now works due to ankitpatira's advice:

library(readxl)
library(forecast)

FinalData <- read_excel("C:\\Users\\rohuyn\\Desktop\\Team\\Team Projects\\Price Elasticity\\FinalDataR.xlsx", sheet = "Final Raw Data")

ForecastData <- aggregate(Revenue~Month, data = FinalData, FUN = sum)

GeneralForecast <- ts(ForecastData$Revenue, start = 0, freq = 12)

fit <- arima((GeneralForecast), c(1, 1, 0),seasonal = list(order = c(1, 1, 0), period = 12))

ActualForecast <- forecast.Arima(fit, h = 5)
Highlighted
Frequent Visitor

Re: ADO.NET: Rscript error - Cannot find Dataset

I am trying to export data from power bi to csv file using R

I am giving the below command

write.csv(ALL_Data, "C:\\Users\\username\\Documents\\folder 1\\folder 2\\folder 3\\folder 4\\filename.csv")

I am getting the below error please help

DataSource.Error: ADO.NET: R script error.
Error in is.data.frame(x) : object 'ALL_Data' not found
Calls: write.csv ... eval.parent -> eval -> eval -> write.table -> is.data.frame
Execution halted

Details:
    DataSourceKind=R
    DataSourcePath=R
    Message=R script error.
Error in is.data.frame(x) : object 'ALL_Data' not found
Calls: write.csv ... eval.parent -> eval -> eval -> write.table -> is.data.frame

Helpful resources

Announcements

August Community Highlights

Check out a full recap of the month!

August 2020 CYST Challenge

Check out the winners of the recent 'Can You Solve These?' community challenge!

Experience what’s next for Power BI

Join us for an in-depth look at the new Power BI features and capabilities at the free Microsoft Business Applications Launch Event.