Creating Animated Reports In Power BI With The Drilldown Player Custom Visual

Last week I had the chance to do something I have not done before: build a Power BI report to be displayed on a big screen hanging on a wall. To make up for the loss of user interactivity, I used the new Drilldown Player custom visual to cycle through different selections and display a new slice of data every few seconds; Devin Knight’s blog post here has a great summary of how to use it. However I wasn’t happy about the look of the Drilldown Player visual in this particular report: the play/stop/pause buttons aren’t much use if you can’t click on them and the visual doesn’t show all of the values that it is cycling through. As a result I hid the visual behind another one and came up with a different way of displaying the currently-displayed selection.

Here’s a simple example of what I did. Imagine you have two identical tables called Table1 and Table2 loaded into your dataset that contain a list of the 24 hours in a day:

image

With no relationship between these tables in the dataset, you can display the 24Hour column from one in a table in your report and then use the Drilldown Player to cycle through the values in the 24Hour column in the other. At this point, because there’s no relationship between the tables, the Drilldown Player visual has no effect on the table. Next create a measure called Displayed as follows:

Displayed =
IF (
    SELECTEDVALUE ( 'Table1'[24Hour] ) =
    SELECTEDVALUE ( 'Table2'[24Hour] ),
     UNICHAR ( 8680 ),
     " "
)

…and add it to the table in the report. This measure uses my old favourite the Unichar() function to display an arrow against the row in the table that matches the currently selected hour in the Drilldown Player. The result is this:

CurrentSelection

This got me thinking about other fun stuff that I could do with this technique. After adding some more columns to my source data:

image

…I created the following measure:

Clock = UNICHAR(128335 + MAX('Table1'[Hour]))

This takes the hour selected by the Drilldown Player and displays the corresponding Unicode character for a clock face showing that hour. Here’s what the measure looks like when displayed in a card:

AnimatedClock

I also had a go at an animation showing the sun and moon rising and setting – I did this by displaying the Unicode characters as data labels in a scatter chart, then using colour to hide everything apart from the data labels – but by this stage I thought things were getting too silly…

SunAndMoon

Anyway, you can download the report with these animations in here, and view it online here. Have fun!

8 thoughts on “Creating Animated Reports In Power BI With The Drilldown Player Custom Visual

  1. Reblogged this on Paul Bunting • Software Architect and commented:
    If you are wondering how to create custom visuals for Power BI? Then, handily, there is an increasing number of open source samples and visuals becoming available.
    Once such visualisation is the Drilldown Player, release by Microsoft as Open Source, and built in conjunction with their partner Gramener (http://gramener.com).
    You can get the code from GitHub @ https://github.com/Microsoft/powerbi-visuals-drilldown-player.
    You can get the compiled visual @ https://store.office.com/en-us/app.aspx?assetid=WA104381035&sourcecorrid=bde0be33-be77-400c-a17c-19849a52e1f5&ui=en-US&rs=en-US&ad=US&appredirect=false

  2. Nice ! Any idea how we could improve this when we have a lot of values in the tables to go through (so far more than 24). The visual indicator will no longer be shown when we are at the bottom of the list because the table will not automatically scroll down.
    I’m thinking of splitting the values in groups and showing multiple occurences of the table each with a specific filter …but I’m sure there will be better ideas…

  3. the link to the Drilldown Player takes you to the office store which has a message saying “This item has been removed from the Store”. any idea why this might have happened?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s