web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Power BI Python and R ...
Power Apps
Unanswered

Power BI Python and R Visual not showing on PowerApps

(0) ShareShare
ReportReport
Posted on by 10

I have a Python and R chart/visual that was plotted in Power BI desktop and published to the web service. The chart works just fine on both Power BI desktop and web but it doesn't show when I used the Dashboard in my Canvas app. Every other thing works fine on the Power BI tile in the canvas app except the Python and R visual. 

Categories:
  • v-yueyun-msft Profile Picture
    Microsoft Employee on at

    Hi , @Ascii0007 

    I test it in my side , the R visual can show in my Power App :

    vyueyunmsft_0-1714959331455.png

     

    And it didi not show in the selection field. We can first select one of the tile in dashboard.

    vyueyunmsft_1-1714959404050.png

    Then we need to get the tile id in Power Bi side:

    vyueyunmsft_2-1714959479353.png

    Then we need to replace the tile id in the Power BI tile control - TileUrl:

    vyueyunmsft_3-1714959547512.png

     

    If this reply can help you , you can click mark this reply as solution (Accept solution) which can help more people, thanks in advance! 

     

    Best Regards,

    Yueyun Zhang

     

     

     

  • Ascii0007 Profile Picture
    10 on at

    The title of the visual shows but not the chart. Still not working on my end. I can't post pictures because of sensitive information on the report.

  • v-yueyun-msft Profile Picture
    Microsoft Employee on at

    Hi , @Ascii0007 

    I can not reproduce your issue in my side , can you try to open the developer tool in your browser setting?

    vyueyunmsft_0-1715061241772.png

    And then you can re-put the whole code in your TileUrl property and check if it return some error in API?

    vyueyunmsft_1-1715061339876.png

     

    Best Regards,

    Yueyun Zhang

     

     

  • Ascii0007 Profile Picture
    10 on at

    I'd try this when I get back to work. However, I can post the R code that is used to plot the graph. The parameters  AE & Average. P is decimal while BrewDate is DateTime. It's a line chart with as many as 15 data points:

    # The following code to create a dataframe and remove duplicated rows is always executed and acts as a preamble for your script:

    # dataset <- data.frame(BrewDate, AE, Average P.)
    # dataset <- unique(dataset)

    # Paste or type your script code here:
    # Load required libraries
    # Load required libraries
    # Load required libraries
    # Load required libraries
    # Load required libraries
    # Load required libraries
    # Load required libraries
    library(ggplot2)
    library(scales)

    # Convert 'BrewDate' values to datetime objects
    dataset$BrewDate <- as.POSIXct(dataset$BrewDate)

    # Sort the data by 'BrewDate' to ensure x-axis alignment
    dataset <- dataset[order(dataset$BrewDate), ]

    # Plot the data
    p <- ggplot(dataset, aes(x = BrewDate)) +
      geom_line(aes(y = AE), color = "blue", linetype = "solid") +
      geom_line(aes(y = `Average P.`), color = "red", linetype = "solid") +
      geom_point(aes(y = AE), color = "blue", shape = 4) +  # Use shape 4 for blue marker
      geom_point(aes(y = `Average P.`), color = "red", shape = 4) +  # Use shape 4 for red marker
      scale_y_continuous(name = "AE. P", sec.axis = sec_axis(~., name = "Temp. Celsius"),
                         breaks = scales::pretty_breaks(n = 20)) +  # Adjust the number of breaks on y-axis
      scale_x_datetime(breaks = "1 day", date_labels = "%b %d") +  # Adjust the breaks on x-axis
      labs(x = "Brew Date") +
      theme_minimal() +
      theme(axis.text.x = element_text(angle = 45, hjust = 1),
            panel.grid.major = element_line(color = "gray", linetype = "dotted"),  # Add major gridlines
            panel.grid.minor = element_line(color = "gray", linetype = "dotted"))  # Add minor gridlines

    # Print the plot
    print(p)
     
     
  • v-yueyun-msft Profile Picture
    Microsoft Employee on at

    Hi , @Ascii0007 

    Thanks for your response! Sorry for that i am not familiar about R script in Power Bi side. I just download the R visual sample pbix file in document to test in my side.

    So in my thought , you can also download the file in this document to test in your side to check if it can show in your dashboard to exclude the code issue?
    Create advanced analytics and visualizations using R scripts - Power BI | Microsoft Learn

    vyueyunmsft_0-1715062987869.png

     

    Best Regards,

    Yueyun Zhang

     

  • Ascii0007 Profile Picture
    10 on at

    Apparently, I utilized the Power BI file with the R code in the link you shared, imported it to my Canvas app and the R Code is not showing. Apparently, the problem is not with the R code but with something else, maybe the environment. I attached pictures of the PBIX file on the webservice and canvas app 

    Canvas app.PNG
    Web service.PNG

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 345 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 312

#3
Mohsin Ali Profile Picture

Mohsin Ali 252

Last 30 days Overall leaderboard