Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
santiagomoncada
Frequent Visitor

Custom Visual doesn't work in Power Bi service

Hi,

I have created a custom Power BI visual using this http://radacad.com/interactive-map-using-r-and-power-bi-create-custom-visual-part-1 tutorial. I can use this custom visual without any problems in power BI desktop and then publish it in Power Bi service without any problem too. The code of this chart is:

 

source('./r_files/flatten_HTML.r')

############### Library Declarations ###############
libraryRequireInstall("ggplot2");
libraryRequireInstall("plotly")
####################################################

g = qplot(`Petal.Length`, data = iris, fill = `Species`, main = Sys.time());
####################################################

p = ggplotly(g);
internalSaveWidget(p, 'out.html');
####################################################

 

The problem is when I create my own custom visual with my dataset, this custom visual works well in Power Bi Desktop, however when I publish it in Power Bi Service it doesn't work. The error that it show me is:

Error.PNG

 

The code that I'm using to create a simple example with my dataset is: 

 

source('./r_files/flatten_HTML.r')

############### Library Declarations ###############
libraryRequireInstall("ggplot2");
libraryRequireInstall("plotly")
####################################################

d <- Values

p=plot_ly(d,x = ~Año, y = ~Valor, type = 'scatter', mode = 'lines', fill = 'tozeroy',
fillcolor="rgba(179, 179, 179, 0.5)",
line=list(color="#b3b3b3"),
showlegend=F )
####################################################

internalSaveWidget(p, 'out.html');
####################################################

 

If there is someone who can help me, I'll be greatfull

1 ACCEPTED SOLUTION

Well, After been trying a lot of time, I came to the conclusion that my problem was that in my dataset I had a column name with special charactes, so I changed the column name and the Custom Visual worked in the Power Bi Service.

 

I hope this can help someone.

View solution in original post

3 REPLIES 3
v-xuding-msft
Community Support
Community Support

Hi @santiagomoncada ,

Do you try to import the file in Service directly?  And please check whether the path local installation of R is C:\Program Files\R\R-3.5.3.  ( Options and settings > Options > R Scripting.)

4.PNG

Best Regards,

Xue

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Best Regards,
Xue Ding
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

@v-xuding-msft  thaks for your answer, 

Answering your question I try to import the file of the custom visual directly in Power Bi Service, however, it haven't work yet and I check the path local instalation of R and it is the same that you show me in the image.

 

Do you have any other idea why the custom visuals doesn't work with my dataset in Power Bi Service ?

Well, After been trying a lot of time, I came to the conclusion that my problem was that in my dataset I had a column name with special charactes, so I changed the column name and the Custom Visual worked in the Power Bi Service.

 

I hope this can help someone.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors