Add Audio or Video to a Power BI Report

Here’s a quick post on how to add audio or video to your Power BI report. In general, media should be used sparingly, and I cannot emphasis that enough. Let your data do the talking. If you are convinced that having media serves your report though, you can use the HTML Viewer custom visual to add audio or video to Power BI reports.

NOTE: Content should play in Power BI Service. While controls display in Desktop, content will not play.

Steps:

  1. Consider — Do you need audio or video in a report? Does it serve your narrative?
  2. Reconsider — Do you *really* need audio or video in a report?
  3. Re-reconsider — Last warning…
  4. Convinced there’s a good reason? Add the HTML Viewer custom visual from the Store/AppSource to your Power BI Report.HTML Viewer
  5. Add data in HTML format using either the <audio> or <video> tag (sample  code below).
  6. Add the column to the Category field in the HTML Viewer visual. The visual currently does not accept measures.HTML Viewer 2
  7. Filter the HTML Viewer so that only one record plays at a time (See the Animal See ‘N’ Say sample for how a slicer is used for this purpose. If no value or more than one value is selected, content will not play).
  8. Save and publish the report to Power BI Service.

Audio Sample Code (HTML5)

Audio

Video Sample Code (HTML5)

Video

A few major caveats:

  1. The audio or video will restart as part of an update to another visual on the page. Keep in mind that if your users are likely to change filters or click on other visuals frequently on the report page, sound will play ad nauseam. I would encourage you to use it sparingly in short, meaningful clips.
  2. Audio and video files should meet the standard criteria for the HTML5 <audio> or <video> tag. There are some limitations in terms of file type (mp3, ogg), etc.
  3. Audio and video content should be hosted online with a publicly accessible URL.
  4. Sound or video will only work in Power BI Service. Controls will display in Power BI Desktop, but no content will load.

A few examples of sound used for past “reports”–none of which have a purpose beyond showcasing audio for the sake of it:

  1. Animal See ‘n’ Say
  2. Dancing Cat Generator
  3. Artillery Game (original version)

Merry Christmas!

UPDATE: There are plenty of other ways to employ the HTML Viewer custom visual. Here are a few:




Leave a Reply

Your email address will not be published. Required fields are marked *