The April 2020 Power BI desktop release is an amazing release. This month the Power BI team has released a new lasso feature to enable users to select multiple visuals at a time. For me working in reports with lots of strategically placed visuals, this is HUGE!! How many times have I struggled to select a visual. Or, better yet needed to open up the visualization pane to select visuals from a list. The Lasso feature is a very welcome addition to the Power BI toolkit.
New Shortcuts
Another interesting feature that I found this month is the ability for Grouping visuals using key commands.
You can Group Visuals using CTRL + G
Then you can Un-Group them using SHIFT + CTRL + G
Like all visual editing programs and even in power point these commands are very common. Thus, seeing these commands in Desktop is amazing. Power BI Team, thanks so much for your wonderful work!!!
Video Tutorial
Download PowerBI Desktop
Want to use these features. Head on over to the PowerBI.com site and download the latest release. Download Here
If you like the content from PowerBI.Tips please follow us on all the social outlets. Stay up to date on all the latest features and free tutorials. Subscribe to our YouTube Channel. Or follow us on the social channels, Twitter and LinkedIn where we will post all the announcements for new tutorials and content.
Introducing our PowerBI.tips SWAG store. Check out all the fun PowerBI.tips clothing and products:
In some recent conversations the notion of minimizing the number of required visuals came up as a topic. While I know from talking with the Microsoft development team more visuals on a report page increases load time. But I haven’t been able to find any substantial numbers on how performance is impacted by increasing the visual count on a page. Spoiler alert, adding a ton of visuals to a page slows it down.
Test Set up
To begin our test I started with a know report the Microsoft September 2018 Layout. This was a good sample as it already had a number of visuals and buttons on the page. I then proceeded to create a single text box with some text in it. Then copy the text box over one hundred times. All the text boxes are placed into a single group. Grouping the text boxes allows for the ability to toggle on and off all of the visuals with a single click.
Here is the before image of the report with the text boxes turned off:
Now with all 100 text boxes turned on. Yes, not pretty I know, but it makes the point.
Conducting the Test
Now that the set up was complete we are able to use the performance analyzer to render all the visuals on the page.
To open the performance analyzer with the new modern Power BI ribbon. Navigate to the View ribbon and click on the Performance analyzer button.
With the Performance analyzer window open we Click the Start Recording button. This begins how the visuals perform when you interact with the report.
There are two options at this point to start recording data.
We can click on items on the report page
Click the Refresh visuals button to refresh the entire page
I chose option number two since I wanted a consistent method to record performance. This removes any human error by performing a sequence of clicks across the screen.
After clicking the Refresh visuals the Performance analyzer generates a ton of data that we can sift through to understand performance of the report page. You can expand on one of the visual elements to understand how many milliseconds it takes for the visual to render by function.
We can now export the data from the recording by Clicking the Export button.
For my test I ran 5 performance tests with the text boxes turned off and 5 tests with the text boxes turned off. The process was the following:
Click Start Recording
Click Refresh visuals
Click Export to extract the data, name the file for future review
Click Clear to remove all data
Go back to step 2 to Refresh visuals
Repeat process until 5 performance tests are complete
Turn on the Text boxes and repeat the process for 5 performance tests
The Test Results
Finally we can dig into the data and figure how much impact we incurred from all the visuals. After a bit of playing around with the datasets in Power Query we are able to come up with the following results.
At a high level adding the 100 extra text boxes increased the load time from 174 ms up to 3,100 ms which is a approximately a staggering 1700 % increase in load time.
Here is the detailed break down for average load times compared with and without text boxes.
There are some interesting notes here. When we added the text boxes it caused all other visuals to increase load time from 22 up to 28 % percent longer per object. Clearly the text boxes took the longest to render.
After completing this test there were a couple of observations that I felt would be best practices when building future reports.
It is important to take time to clearly label your visual elements on the report canvas. Doing so makes it easy to identify each item in the performance analyzer.
Increasing the number of visuals on a page hurts rendering performance. So think carefully about how many visuals you need to add to convey the data story you are trying to tell.
When a visual is not shown it does not impact performance rendering of the page.
A trend I am seeing is individuals are creating really long pages. Meaning the page is 1280 x 3000 or even 4000 pixels long. This is a nice feature that lets the report consumer scroll through multiple visuals. However, this has an unintended consequence adding all the extra visuals is slowing the time for the report to render. Instead of increasing the page length it would be better to control which visuals are being shown by using Bookmarks and Grouping. To learn more about bookmarks & grouping visuals visit:
Limit adding style elements such as drop shadows and visual shading images as these will increase load speeds. Instead push those types of changes down to a background image that can be placed on the page. This is the technique used in creating PowerBI.Tips layouts.
If you like the content from PowerBI.Tips please follow us on all the social outlets. Stay up to date on all the latest features and free tutorials. Subscribe to our YouTube Channel. Or follow us on the social channels, Twitter and LinkedIn where we will post all the announcements for new tutorials and content.
Introducing our PowerBI.tips SWAG store. Check out all the fun PowerBI.tips clothing and products:
In the October update of PowerBI Desktop we were given a number of really useful features, ranging from a new Date Slicer, Grid lines, Grouping, Binning, Top N Filters, and R-powered custom visuals. For the full release on the October 2016 software release you can read more here.
For those of you who have followed my site you already know that I absolutely love the ability to create R-visuals within PowerBI. If you want to learn more you can read the R script tutorials here.
As I’ve been exploring this October release of Power BI Desktop two features have really stood out. First, the ability to use the Date Slicer and second the new feature of Grouping for Bar Charts. In my daily work flow I have struggled in the past with solutions which are now solved.
Welcome to my love & hate relationship with time bound data sets. Inevitability at some point you will encounter a need to manipulate data over time. Common business questions will come in the form of: What was my percent change compared from this month compared to last month? What is my sales performance for this year? Are we up or down compared to the same period last year? While these questions are simple I have found that calculating measures and subsequently building visuals can get very complex in a hurry. Enter the Date Slicer. Let me be clear, the Date Slicer will not solve all your problems, it does present a very useful interface that will let report users quickly navigate through their time delineated data.
What is the Date Slicer? I’m glad you asked. Behold….
Here are a couple of key items to point out. On the left side of the visual you are given the ability to select the starting date, and ending date.
The bottom of the Date Slicer has an adjustable time bar that allows quick time adjustments.
On the right side of the visual you can toggle between different date selection modes, Between, Before, After, and List.
Ok, enough about the Date Slicer, how about the Groupings feature. Lets say you start off with a bar chart that looks similar to the following:
Well, maybe you’re only interested in Items 9, 10, and 5. Grouping now allows the selection of multiple bars and by right clicking you can Group, Include, or Exclude.
Clicking group creates a new column in the Fields area that groups the items together and adds them to the chart legend.
Let me tell you this is helpful, especially when your bar chart looks like this:
Be honest, you have published a report or two when there were just way to many bars. The different between the largest bar and all the small bars barely tells you any information. This is why grouping is helpful. When you receive data and you need to focus your story to the important pieces then grouping is your friend.
Enough babbling, let’s get to the tutorial.
Open up PowerBI Desktop, Click the Get Data button on the Home ribbon and select Blank Query. Click Connect to open the Query Editor. ClickAdvancedEditor on the View ribbon. While in the Advanced Editor paste the following code into the editor window, click Done to complete the data load.
Note: If you need some more help loading the data follow this tutorial about loading data using the Advanced Query Editor. This tutorial teaches you how to copy and paste M code into the Advanced Editor.
let
Source = Excel.Workbook(Web.Contents("https://powerbitips03.blob.core.windows.net/blobpowerbitips03/wp-content/uploads/2016/11/Sales-Data-Two-Years.xlsx"), null, true),
Sales_Table = Source{[Item="Sales",Kind="Table"]}[Data],
#"Changed Type" = Table.TransformColumnTypes(Sales_Table,{{"Date", type date}, {"Product", type text}, {"Sales", Int64.Type}})
in
#"Changed Type"
Rename the Query to Sales Data. Once you’ve completed the data load your data should look like the following.
On the Home ribbon click Close & Apply to complete the data load.
Great, we are ready to start adding visuals now. Add a Slicer visual from the Visualizations window and populate the visual with the Date field. By default, the slicer will auto recognize that the field being added is a date and will automatically show the Date Slicer.
Next, add a bar chart visualization. The Date field will be the Axis, and the Sales will be the Value.
Again by default the Date filed will be entered as a Hierarchy field. Click the Drill Down button until you see a monthly view of the date. This should require two clicks, the first drills down to quarters, then second click drills down to month level. After doing this your visual should look like the following:
Add a second bar chart with following fields selected.
Sort the Sales by Product bar chart in descending sale order by clicking the Ellipsis and when the drown down menu appears selecting Sort by Sales.
Now that we have built a couple visuals and a Date Slicer, take some time to explore how the Date Slicer interacts with the bar charts. In the example below I modified the starting date to 6/1/205 and the ending date to be 9/30/2015.
To utilize the grouping feature we will group Items 1,2,3 and 4 together. While holding the control button click Items 1,2,3 and 4 on the Sales by Product bar chart.
Right click Item 3 an menu will appear, select Group. Notice once you do this a new Product (Group) field appears in the field menu and the Product (Group) is automatically added to the legend of the bar chart visual.
To edit the grouping you can click on the Field labeled Product (groups) and select Edit Groups. Doing this reveals the grouping dialog box.
You can rename the created group by double clicking the name Item 1 & Item 2 & Item 3 & Item 4.
Change the name of the grouping to be titled Special Items. Click OK to close the Groups dialog box. Notice how the bar chart updates the legend values to renamed grouping.
Well, that wraps up this tutorial. I hope you enjoyed it. Below is a live demo of what we built today.
Make sure you share the content if you liked this tutorial.