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)
Mohsen Sichani
  • 1,002
  • 12
  • 33
  • What part are you stuck on? – Alexis Olson Feb 13 '20 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" – Mohsen Sichani Feb 13 '20 at 18:50
  • Did you find a solution? – solopiu Nov 04 '20 at 12:47
  • 2
    Unfortunately not, had to do it in R – Mohsen Sichani Nov 04 '20 at 17:56
  • 1
    [These R packages are supported in Power BI.](https://learn.microsoft.com/en-us/power-bi/connect-data/service-r-packages-support) And [these Python libraries are supported.](https://learn.microsoft.com/en-us/power-bi/connect-data/service-python-packages-support) Plotly is not on that list, so yes, you'll have to do it in R. – Dolunaykiz Dec 16 '22 at 14:24

0 Answers0