Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

anandav

Easy As Insights — Part 2: Taming Power BI Maintenance — Visuals Naming Convention

When you are developing visual analytics insights visuals in tools such as Power BI, every individual visual element you add to a page has an ID or name. Most beginners do not even notice this and if you are developing some basic insights this is fine.
But if you are an advanced insights developer and you start using some of the advanced techniques of using bookmarks and using hide/show feature of visual elements to create visual toggle effects, a single insights report page will start to have may be 25 to 50 visual elements including hidden visuals.

Though it will create a great user experience, having many visual elements in a single page might slow down the report. Usually if the Power BI data is loaded into the Power BI and is small to medium size the performance will be good.
But if the visual data source is either direct query to a SQL database or ConnectLive to Analysis Services Tabular model, depending on the performance of the backend and DAX queries, users could have really bad experience. Therefore it is a balancing act of performance vs. user experience when using such advanced techniques. I will cover how to manage user experience vs. performance in later articles.

Toggle effect using Power BI Bookmarks
As an example in the sample screen when a user is viewing the Sales information the user can click on the orders related KPIs displayed the bottom left of the screen to toggle the graph to respective KPI.
A1.png
I will cover how this is done in the “Easy As Insights — Performance” series of articles.

Here let us explore when using advanced features such as hidden visuals and bookmarks, what are the best practices to make maintaining such insight reports easy.

Standardizing Visual Names
To view the names of the visuals in the page you will have to enable it clicking on View in main ribbon —> Selection under Show Panes. (as of February 2021)
This will display the selection Pane.
 

When you add a visual element to the tab the Selection Pane will show you the name of the elements. For example, if you add a Card visual the Selection Pane will show ‘Card’ as the name for that visual.
A3.png
As you can imagine after sometime and after many many more visuals in the report it is very easy to get into the nightmare of which Card name corresponds to which visual in the page.

Therefore always it is best to rename the name of the visual in the Selection Pane to correspond to the data displayed in the visual.
For example in the sample screen the Card visual in the left hand side have names in the Selection Pane corresponding to the data they display. Each Card in the left has a colorless Button on top (to enable graph toggle function). In the image below I have indicated in blue boxes (right hand lower corner) the Card and Button pairs and how they are renamed to correspond to what data they display.
I will address the order of the items in Selection Pane in a moment.
 
A4.png
You could even use a prefix to the names to easily identify what type of visual they are. e.g. For Textbox you could use txtName like txtHeader1.
Using prefix for visual names in Selection Pane has some limitations. If you are using visuals like Card or Charts and you have Title attribute of the visual set, then the visual name in the Selection Pane will use the visual title as the name. But still where ever you can it is best to use the card type prefix in the visual name.

Ordering Visuals in Selection Pane
Along with proper names ordering the visual names in the Selection Pane is very important so that you can easily locate the corresponding visual.
In the sample screen start from left hand corner and move left to right for ordering. For KPIs in left hand I follow top to bottom for that group as it makes a logical grouping. Same with the chart visuals.
 
A5.png

As a persdonal preference I use descending order of visuals starting from top left corner — meaning the visual in the top left corner goes to the bottom of the Selection Pane. Then from left to right OR logical grouping order of items.
The reason for following descending order is that when you add a new item to the page it goes to the top of the Selection Pane. Therefore by moving least changing items (header details) to the bottom of the Selection Pane it is less scrolling when working with newly added items.

You can standardize on any order that makes sense for you but follow a standard in all the temples.
 
Benefits
The visuals naming convention and ordering in Selection Pane are really critical when you are using bookmarks to show/hide visuals. As you can imagine without proper name to identify the card visuals, it will be a nightmare to find which visual should be hidden and which one should be displayed.

This will become more evident in the next article in this series when we look at Bookmark naming conventions and how it is useful for toggling effects.