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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Problem with formattable package from r

Hi, i´m try to excecute this code in power bi desktop:

 

 

library(formattable)
as.htmlwidget(
  formattable(mtcars, list(mpg = formatter("span",
                                           style = x ~ style(display = "block",
                                                             "border-radius" = "4px",
                                                             "padding-right" = "4px",
                                                             color = "white",
                                                             "background-color" = rgb(x/max(x), 0, 0))))
  )
)

but, it comes with this problem

hhh.png

 

When i excecute the code in Rstudio, it works:

sssss.jpg

 

 

so, I searched in the packages soported in power bi to custom visual object and the library formattable is there. You can check by your self here: 

https://docs.microsoft.com/en-us/power-bi/service-r-packages-support

 

so...I don´t understand, what happend...because the code is fine and the data was update like I used to do. Can you helpme?

 

 

 

Status: Needs Info
Comments
v-yulgu-msft
Employee

Hi @sergiomora123 ,

 

What does the error message say? Please translate it into English.

 

Best regards,

Yuliana Gu

v-yulgu-msft
Employee
Status changed to: Needs Info
 
sergiomora123
New Member

 

 

The visual object can not be displayed 

no image has been created. The R code has not generated any visual objects. Make sure that the R script results in a trace on the default R device.

 

 

Sergio M.

sysadminPoli
New Member

Good afternoon ,

 

We have this problem and it is essential to count on you to give a brief answer and solution. Can help us? @v-yulgu-msft 

                   Thank You.

 

Atte;

 

Universidad Politecnico GranColombiano - Bogotá Colombia