Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Hi all,
i have just instaled R script and when I tried to view the datas on the graph apperas an erros mensage as bellow ..
could anyone help me?
thanyou
Riad
Feedback Type:
Frown (Error)
Timestamp:
2017-10-11T20:40:07.4155015Z
Local Time:
2017-10-11T17:40:07.4155015-03:00
Session ID:
f4870f4e-daaf-46a2-a413-e7da29e24f6e
Release:
October 2017
Product Version:
2.51.4885.581 (PBIDesktop) (x64)
Error Message:
R script error.
Loading required package: scales
Warning messages:
1: In library(package, lib.loc = lib.loc, character.only = TRUE, logical.return = TRUE, :
there is no package called 'scales'
2: In libraryRequireInstall("scales") :
*** Failed to install 'scales' ***
Loading required package: fpc
Warning messages:
1: In library(package, lib.loc = lib.loc, character.only = TRUE, logical.return = TRUE, :
there is no package called 'fpc'
2: In libraryRequireInstall("fpc") : *** Failed to install 'fpc' ***
Loading required package: car
Warning messages:
1: In library(package, lib.loc = lib.loc, character.only = TRUE, logical.return = TRUE, :
there is no package called 'car'
2: In libraryRequireInstall("car") : *** Failed to install 'car' ***
Loading required package: dbscan
Warning messages:
1: In library(package, lib.loc = lib.loc, character.only = TRUE, logical.return = TRUE, :
there is no package called 'dbscan'
2: In libraryRequireInstall("dbscan") :
*** Failed to install 'dbscan' ***
Error in loadNamespace(name) : there is no package called 'dbscan'
Calls: autoEpsFunc ... tryCatch -> tryCatchList -> tryCatchOne -> <Anonymous>
Execução interrompida
OS Version:
Microsoft Windows NT 10.0.15063.0 (x64 pt-BR)
CLR Version:
4.7 or later [Release Number = 460798]
Peak Virtual Memory:
33.8 GB
Private Memory:
311 MB
Peak Working Set:
435 MB
IE Version:
11.608.15063.0
User ID:
e858f2f8-a0a1-4820-8754-5e51e9f7814d
Workbook Package Info:
1* - pt-BR, Query Groups: 1, fastCombine: Disabled, runBackgroundAnalysis: True.
Telemetry Enabled:
True
Model Default Mode:
Import
Snapshot Trace Logs:
C:\Users\Riad\AppData\Local\Microsoft\Power BI Desktop\FrownSnapShot1141400191.zip
Performance Trace Logs:
C:\Users\Riad\AppData\Local\Microsoft\Power BI Desktop\PerformanceTraces.zip
Enabled Preview Features:
PBI_reportBookmarks
Disabled Preview Features:
PBI_shapeMapVisualEnabled
PBI_EnableReportTheme
PBI_numericSlicerEnabled
PBI_SpanishLinguisticsEnabled
PBI_daxTemplatesEnabled
CustomConnectors
Disabled DirectQuery Options:
PBI_DirectQuery_Unrestricted
Cloud:
GlobalCloud
Activity ID:
null
Time:
Wed Oct 11 2017 17:35:32 GMT-0300 (Hora oficial do Brasil)
Client Error Code:
ServiceErrorToClientError
Error Details:
R script error.
Loading required package: scales
Warning messages:
1: In library(package, lib.loc = lib.loc, character.only = TRUE, logical.return = TRUE, :
there is no package called 'scales'
2: In libraryRequireInstall("scales") :
*** Failed to install 'scales' ***
Loading required package: fpc
Warning messages:
1: In library(package, lib.loc = lib.loc, character.only = TRUE, logical.return = TRUE, :
there is no package called 'fpc'
2: In libraryRequireInstall("fpc") : *** Failed to install 'fpc' ***
Loading required package: car
Warning messages:
1: In library(package, lib.loc = lib.loc, character.only = TRUE, logical.return = TRUE, :
there is no package called 'car'
2: In libraryRequireInstall("car") : *** Failed to install 'car' ***
Loading required package: dbscan
Warning messages:
1: In library(package, lib.loc = lib.loc, character.only = TRUE, logical.return = TRUE, :
there is no package called 'dbscan'
2: In libraryRequireInstall("dbscan") :
*** Failed to install 'dbscan' ***
Error in loadNamespace(name) : there is no package called 'dbscan'
Calls: autoEpsFunc ... tryCatch -> tryCatchList -> tryCatchOne -> <Anonymous>
Execução interrompida
Stack Trace:
Microsoft.PowerBI.ExploreServiceCommon.ScriptHandlerException: R script error.
Loading required package: scales
Warning messages:
1: In library(package, lib.loc = lib.loc, character.only = TRUE, logical.return = TRUE, :
there is no package called 'scales'
2: In libraryRequireInstall("scales") :
*** Failed to install 'scales' ***
Loading required package: fpc
Warning messages:
1: In library(package, lib.loc = lib.loc, character.only = TRUE, logical.return = TRUE, :
there is no package called 'fpc'
2: In libraryRequireInstall("fpc") : *** Failed to install 'fpc' ***
Loading required package: car
Warning messages:
1: In library(package, lib.loc = lib.loc, character.only = TRUE, logical.return = TRUE, :
there is no package called 'car'
2: In libraryRequireInstall("car") : *** Failed to install 'car' ***
Loading required package: dbscan
Warning messages:
1: In library(package, lib.loc = lib.loc, character.only = TRUE, logical.return = TRUE, :
there is no package called 'dbscan'
2: In libraryRequireInstall("dbscan") :
*** Failed to install 'dbscan' ***
Error in loadNamespace(name) : there is no package called 'dbscan'
Calls: autoEpsFunc ... tryCatch -> tryCatchList -> tryCatchOne -> <Anonymous>
Execução interrompida
---> Microsoft.PowerBI.Radio.RScriptRuntimeException: R script error.
Loading required package: scales
Warning messages:
1: In library(package, lib.loc = lib.loc, character.only = TRUE, logical.return = TRUE, :
there is no package called 'scales'
2: In libraryRequireInstall("scales") :
*** Failed to install 'scales' ***
Loading required package: fpc
Warning messages:
1: In library(package, lib.loc = lib.loc, character.only = TRUE, logical.return = TRUE, :
there is no package called 'fpc'
2: In libraryRequireInstall("fpc") : *** Failed to install 'fpc' ***
Loading required package: car
Warning messages:
1: In library(package, lib.loc = lib.loc, character.only = TRUE, logical.return = TRUE, :
there is no package called 'car'
2: In libraryRequireInstall("car") : *** Failed to install 'car' ***
Loading required package: dbscan
Warning messages:
1: In library(package, lib.loc = lib.loc, character.only = TRUE, logical.return = TRUE, :
there is no package called 'dbscan'
2: In libraryRequireInstall("dbscan") :
*** Failed to install 'dbscan' ***
Error in loadNamespace(name) : there is no package called 'dbscan'
Calls: autoEpsFunc ... tryCatch -> tryCatchList -> tryCatchOne -> <Anonymous>
Execução interrompida
at Microsoft.PowerBI.Radio.RScriptWrapper.RunScript(String originalScript, Int32 timeoutMs)
at Microsoft.PowerBI.Client.Windows.R.RScriptHandler.GenerateVisual(ScriptHandlerOptions options)
--- End of inner exception stack trace ---
at Microsoft.PowerBI.Client.Windows.R.RScriptHandler.GenerateVisual(ScriptHandlerOptions options)
at Microsoft.PowerBI.ExploreServiceCommon.ScriptVisualCommandFlow.RunInternal(Stream dataShapeResultStream, QueryBindingDescriptor& bindingDescriptor)
at Microsoft.PowerBI.ExploreServiceCommon.ScriptVisualCommandFlow.Run(Stream dataShapeResultStream, QueryBindingDescriptor& bindingDescriptor)
at Microsoft.PowerBI.ExploreHost.SemanticQuery.ExecuteSemanticQueryFlow.TransformDataShapeResult(QueryCommand transformCommand, SemanticQueryDataShapeCommand command, Stream dataShapeResultStream, QueryBindingDescriptor& bindingDescriptor)
at Microsoft.PowerBI.ExploreHost.SemanticQuery.ExecuteSemanticQueryFlow.ProcessAndWriteDataQuery(IQueryResultDataWriter queryResultDataWriter, DataShapeGenerationContext dsqGenContext, EntityDataModel model, DataQuery query, ServiceErrorStatusCode& serviceErrorStatusCode)
at Microsoft.PowerBI.ExploreHost.SemanticQuery.ExecuteSemanticQueryFlow.ProcessAndWriteSemanticQueryCommands(IQueryResultsWriter queryResultsWriter, ExecuteSemanticQueryRequest request, IConceptualSchema conceptualSchema, EntityDataModel model)
DPI Scale:
100%
Supported Services:
Power BI
Formulas:
section Section1;
shared Cadastrolojas = let
Source = Excel.Workbook(File.Contents("C:\Users\User\Dropbox\Café\Fechamento\Operações Próprias\Fechamento\2017\basecafepowerbi.xlsx"), null, true),
Cadastrolojas_Sheet = Source{[Item="Cadastrolojas",Kind="Sheet"]}[Data],
#"Changed Type" = Table.TransformColumnTypes(Cadastrolojas_Sheet,{{"Column1", type text}, {"Column2", type text}, {"Column3", type text}}),
#"Promoted Headers" = Table.PromoteHeaders(#"Changed Type", [PromoteAllScalars=true]),
#"Changed Type1" = Table.TransformColumnTypes(#"Promoted Headers",{{"Nome Sistema", type text}, {"Loja", type text}, {"Marca", type text}})
in
#"Changed Type1";
shared Cadastroprodutosvenda = let
Source = Excel.Workbook(File.Contents("C:\Users\User\Dropbox\Café\Fechamento\Operações Próprias\Fechamento\2017\basecafepowerbi.xlsx"), null, true),
Cadastroprodutosvenda_Sheet = Source{[Item="Cadastroprodutosvenda",Kind="Sheet"]}[Data],
#"Promoted Headers" = Table.PromoteHeaders(Cadastroprodutosvenda_Sheet, [PromoteAllScalars=true]),
#"Changed Type" = Table.TransformColumnTypes(#"Promoted Headers",{{"Descrição do Produto", type text}, {"Unid.", type text}, {"Grupo", type text}, {"Classificação", type text}, {"Linha de Produto", type any}, {"Preço Venda", type number}, {"NCM (Franqueador)", Int64.Type}, {"Marca", type text}, {"Código Produto & Marca", type text}, {"Grupo (ajustado)", type text}})
in
#"Changed Type";
shared receitaloja = let
Source = Excel.Workbook(File.Contents("C:\Users\User\Dropbox\Café\Fechamento\Operações Próprias\Fechamento\2017\basecafepowerbi.xlsx"), null, true),
receitaloja_Sheet = Source{[Item="receitaloja",Kind="Sheet"]}[Data],
#"Promoted Headers" = Table.PromoteHeaders(receitaloja_Sheet, [PromoteAllScalars=true]),
#"Changed Type" = Table.TransformColumnTypes(#"Promoted Headers",{{"Marca", type text}, {"Loja", type text}, {"mês/ano", type date}, {"Ano", Int64.Type}, {"R.Bruta", type number}, {"Desconto", type number}, {"Cortesia", type number}, {"Cupons", Int64.Type}, {"Qtde. Produtos Vendidos", Int64.Type}})
in
#"Changed Type";
shared receitaproduto = let
Source = Excel.Workbook(File.Contents("C:\Users\User\Dropbox\Café\Fechamento\Operações Próprias\Fechamento\2017\basecafepowerbi.xlsx"), null, true),
receitaproduto_Sheet = Source{[Item="receitaproduto",Kind="Sheet"]}[Data],
#"Promoted Headers" = Table.PromoteHeaders(receitaproduto_Sheet, [PromoteAllScalars=true]),
#"Changed Type" = Table.TransformColumnTypes(#"Promoted Headers",{{"Marca", type text}, {"Loja", type text}, {"mês/ano", type date}, {"Ano", Int64.Type}, {"Código Produto & Marca", type text}, {"Qtde. Produtos Vendidos", Int64.Type}, {"R.Bruta", type number}})
in
#"Changed Type";
shared #"Errors in receitaloja" = let
Source = receitaloja,
#"Added Index" = Table.AddIndexColumn(Source, "Row Number" ,1),
#"Kept Errors" = Table.SelectRowsWithErrors(#"Added Index", {"Marca", "Loja", "mês/ano", "Ano", "R.Bruta", "Desconto", "Cortesia", "Cupons", "Qtde. Produtos Vendidos"}),
#"Reordered Columns" = Table.ReorderColumns(#"Kept Errors", {"Row Number", "Marca", "Loja", "mês/ano", "Ano", "R.Bruta", "Desconto", "Cortesia", "Cupons", "Qtde. Produtos Vendidos"})
in
#"Reordered Columns"
;
Solved! Go to Solution.
Hi Riad,
In your error message it says in a few places that a package is missing. E.g. the "scales" package.
You will need to have all of the relevant packages installed on your local machine before running the R script in power BI.
Here's a quick blog on how to install R packages: https://www.r-bloggers.com/installing-r-packages/
I suggest you look through your error message and install all of the suggested packages.
Hope that helps,
Will
Hi,
Are you running this R script on your desktop or online?
Have you installed all of the libraries you need in your local R environment?
Cheers,
Will
Hi Will,
I', ruinning on my desktop (pbi desktop) ...
How can i be sure about all the libraries i need?
I think i have jist installed the basic things about R ...
thank you
Riad
Hi Riad,
In your error message it says in a few places that a package is missing. E.g. the "scales" package.
You will need to have all of the relevant packages installed on your local machine before running the R script in power BI.
Here's a quick blog on how to install R packages: https://www.r-bloggers.com/installing-r-packages/
I suggest you look through your error message and install all of the suggested packages.
Hope that helps,
Will
Packages installed and graphic ok.
thank you.
Riad
No Problem, glad it's working 🙂
Have a good one,
Will
User | Count |
---|---|
139 | |
113 | |
103 | |
73 | |
63 |
User | Count |
---|---|
136 | |
125 | |
107 | |
70 | |
61 |