Forum Discussion

Cheryl's avatar
Cheryl
Regular Visitor
4 years ago
Solved

Add a widget to a Power BI report

I am trying to add a widget to a PowerBI report. I've downloaded a few of the HTML viewers (HTML CSS Viewer, HTML Content, and Shielded HTML Viewer) , but am not understanding where to put the code in any of them. I've tried putting the html in a spreadsheet and uploading that, but there's no place where I can indicate the field that has the code.

 

Here is the html code for the Widget: 

<div data-cdc-widget="COVIDCountyCheck" data-horizontal="true" ></div> <script src=https://tools.cdc.gov/1M1B></script>

 

Can someone give me step-by-step instructions? I don't use HTML code normally, and I'm really lost.

 

Thank you!

Cheryl

  • Hi, Cheryl 

     

    By adding a tile to your dashboard, you can place an image, text box, video, streaming data, or web code on your dashboard.

     

    You can paste or type in any HTML content, as a tile, to your report or dashboard. Enter the embed code manually or copy/paste from sites such as Twitter, YouTube, embed.ly, and so on.

    1. From the Add tile window, select Web content > Next.

    2. Add information to the Add web content tile window:

      a. To display a title above the tile, select Display title and subtitle and enter a Title and an optional Subtitle.

      b. Enter the embed code. In this example, we're copying and pasting a Twitter feed.

      c. Select Apply.

     

    Here is the related document hope it can help you.

    https://docs.microsoft.com/power-bi/create-reports/service-dashboard-add-widget 

     

    Best Regards,

    Community Support Team _Charlotte

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

6 Replies

  • truptis's avatar
    truptis
    Icon for Community Champion rankCommunity Champion

    Cheryl , could you please breif a bit more about your requirement? 

    • Cheryl's avatar
      Cheryl
      Regular Visitor

      Hi truptis , Thank you for reviewing my message.

      Here is the website where the report is posted: Oregon Data for Decisions (oregondatadecisions.org) and here is the published PowerBI: Microsoft Power BI. 

       

      I want to add this widget to my report as a visual. I've never seen the widget, so I don't know how big it will be. It will probably replace a visual on page 1, unless it makes sense to have it be bigger, in which case I'd probably rearrange things and/or add a page.

       

      From what I've read (e.g., https://p3adaptive.com/2018/11/dynamically-embedding-web-pages-in-power-bi/), what you need to do is make a calculated column in a table. I'm not very familiar with DAX or HTML, so I don't know what the calculated column should include. The examples have a column with the name, the url, and the html that references the url column. I've tried following the examples, but I just keep getting messages that what I've entered isn't in proper DAX syntax. Just putting the widget html I was given doesn't work.

       

      The examples all have the HTML within Iframes. I don't know if I need to add that or not. 

       

      Thank you for any help you can provide.

      Cheryl