6

I am trying to replicate this for Python, but cannot find any answer:

Is it possible to use R Plotly library in R Script Visual of Power BI?

or :

https://radacad.com/interactive-map-using-r-and-power-bi-create-custom-visual-part-1

Just to be a little more specific: How can I change the offered solution to work with script.py rather than script.R

Any help is highly appreciated.

I have found that in this folder there is a file called capabilities.json, so I assume this is one part of the solution:

  "script": {
      "scriptProviderDefault": "R", ###I guess this needs to be changed to Py
      "scriptOutputType": "html",
      "source": {
        "objectName": "rcv_script",# not sure about this
        "propertyName": "source"
      },
      "provider": {
        "objectName": "rcv_script",# not sure about this
        "propertyName": "provider"
      }
    }

And also after removing referencing dependecies.json in this project, and after building and importing this to Power BI, I got this error

 Error Message:
 An exception of type System.ArgumentException occured.

 Stack Trace:
 System.ArgumentException: The supplied rendering engine is not supported
 at Microsoft.PowerBI.ExploreHost.SemanticQuery.ExecuteSemanticQueryFlow.TransformDat aShapeResult(QueryCommand transformCommand, SemanticQueryDataShapeCommand command, Stream dataShapeResultStream, QueryBindingDescriptor& bindingDescriptor)
 at Microsoft.PowerBI.ExploreHost.SemanticQuery.ExecuteSemanticQueryFlow.ExecuteDataQuery(IQueryResultDataWriter queryResultDataWriter, EngineDataModel engineDataModel, DataQuery query, Int32 queryId, ServiceErrorStatusCode& serviceErrorStatusCode, CancellationToken cancelToken)
 at Microsoft.PowerBI.ExploreHost.SemanticQuery.ExecuteSemanticQueryFlow.ProcessAndWriteSemanticQueryCommands(IQueryResultsWriter queryResultsWriter, IList`1 queries, HashSet`1 pendingQueriesToCancel, EngineDataModel engineDataModel)
5
  • What part are you stuck on? Commented Feb 13, 2020 at 18:44
  • 2
    part 2.2. of the stackoverflow answer. i.e. "script.R is a template that sets up your R script. We're going to edit that later". So if I put script.py there, not sure how the pbivis understands to look for script.py rather than script.R after running this command "pbiviz package" Commented Feb 13, 2020 at 18:50
  • Did you find a solution? Commented Nov 4, 2020 at 12:47
  • 2
    Unfortunately not, had to do it in R Commented Nov 4, 2020 at 17:56
  • 1
    These R packages are supported in Power BI. And these Python libraries are supported. Plotly is not on that list, so yes, you'll have to do it in R. Commented Dec 16, 2022 at 14:24

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.