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:

[sourcecode language=”text” padlinenumbers=”true”]
Displayed =
IF (
SELECTEDVALUE ( ‘Table1′[24Hour] ) =
SELECTEDVALUE ( ‘Table2′[24Hour] ),
UNICHAR ( 8680 ),
" "
)
[/sourcecode]

…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:

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

…I created the following measure:

[sourcecode language=”text”]
Clock = UNICHAR(128335 + MAX(‘Table1′[Hour]))
[/sourcecode]

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:

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…

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

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

  1. Paul Bunting – Experienced Software Architect with a demonstrated 20+ years’ developing solutions for the manufacturing and architectural design industries. Skilled in the design and creation of advanced analytical systems for real time system monitoring and process improvements. A focussed professional with keen attention to detail and adaptive approach to development and solution design. Specialist in • Enterprise Manufacturing Intelligence • Real Time Processing and Analytics • Big Data Analytics • Machine Learning and Data Science • IoT Analytics
    Paul Bunting says:

    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. Matt Allington – Sydney Australia – I am a full time self service Business Intelligence trainer and consultant specialising in Microsoft Power BI, Power Query, and Power Pivot for Excel
    Matt Allington says:

    Nice. You are the undisputed king of UNICHAR

  3. 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…

  4. 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?

    1. Chris Webb – My name is Chris Webb, and I work on the Fabric CAT team at Microsoft. I blog about Power BI, Power Query, SQL Server Analysis Services, Azure Analysis Services and Excel.
      Chris Webb says:

      No idea – maybe someone found a bug? Hopefully it will be back soon.

  5. its nice..working great.. but rather than taking a value from column can you take measure.or can you please make an other version to refresh the measure.. and all the functionality /animation options as the same visual..