Skip to main content

Description for everything

Just think of a scenario, you are working on a Power BI report that is created by multiple developers and now you are debugging it. If you have no knowledge of the ins and outs of it you will get jaded by it very soon. But what if you see some description or textual information within the report? That will be the ray of light 💡. 

As a best practice, if you are creating any report from scratch try to add a description to almost everything. Starting from the tables, columns, measures, calculation groups, field parameters.....

How to do it? Okay, let's start by providing a description of the tables. I am using Sample Superstore data and want to provide a description - Contains sales data. To do so, go to the data model view. Select the table where you need to add the description. Under properties, you can provide a description under the description section.


Easy peasy lemon squeezy!! That's basic and at Analyst in Action, we always strive to go beyond the basic knowledge. Let's take it to the next level, if you scroll a bit you will observe the row label and Key column. What does it mean? The key column is the one that contains a unique value in your table. In my case, I have an Index column but in real-life scenarios, it can be - Order IDs, Product IDs...


If you are an Excel user you can easily tell your row label. Any column that can be identified as a row can act as a row label. If you have selected your key column and row label, and provided a description of a particular table that table can be treated as a featured table. Here is a quick read that will you a glimpse of featured tables.


Once you hit save you will observe, that the Sample Superstore Table is now a featured table. Also, when hovering over the table, you can observe the description is popping up.


Let's move to the next step and provide the description of one of the columns. We will be adding the description to the category column as "represents the category of order". A similar approach to be followed. Go to the data model view, select the category column, and under the properties pane, you can provide the description.


That's one of the approaches, you can do the same with TMDL view and you can use external tools such as Tabular Editor to do the same. What is TMDL? Here is a quick read on the introduction to the TMDL view. This article will provide you with everything you can do with TMDL view. Let's see how we can provide a description in Tabular Editor. FYI, I am using Tabular Editor version 2. Select the column (Segment) and you can provide the description in the highlighted area by double-clicking on it. Hit save and the changes will be reflected in your report.


Protip- To make your report to be more self-service-ready, it is always advisable to provide a user-friendly to all the columns. Either you change it directly in the backend or you can do it in Power BI itself.


One of the fastest and easiest ways to do so, head to the query editor and just double-click on the column header. This will add a step in the applied step pane. The core idea is to provide these names in a single step instead of adding them in different steps. You can double-click on each and every column and change the names.


There are multiple approaches to changing column names but from experience nothing can get simpler than this approach. With a single step, you have renamed all the columns.


How cool is that🤯. Now, let's provide a description of the measures. With measures, you can play around more by providing a comment within the measure and provide a description as well. Let's start by providing a comment, if you create any measure and want to bring life to it commenting is the way to go. Just add "--" and type the text. Some examples of comments are listed below. If you observe closely comments are highlighted in green.

Furniture Sales =
CALCULATE ( [Total Sales], 'SampleSuperstore'[Category] = "Furniture" )

-- furniture sales calculated


Sales Callback Id =
SUMX (
    SampleSuperstore,
    IF ( SampleSuperstore[Year_Month] > "201101", [Total Sales] )
)

-- Do not use this combination

To provide the description, you can follow the same approach as we did for tables and columns. Go to the model view. Select the measure and provide the description under the properties pane. 


Protip- To make your report, as organized as it can be you can try to group your measures under a folder. To do so, go to the data model view and select all the measures by holding Ctrl. Under properties, provide a name in the display folder.

In conclusion, providing a description can always help to understand complex reports and make your report self-service worthy. All the mentioned methods require a bit of effort from the developer but by doing so you are adding a life to your report.




"All our articles are intended to address all the frequently asked questions related to a topic. Do leave a comment if it answers any of your question. "


Thanks for Reading Let's connect on LinkedIn. For more such blogs and pro tips do follow us


Comments

Popular posts from this blog

Copying Bookmarks from one Power BI report to another

Let's think of a scenario, where you want to copy the bookmarks from one report to another. Most obvious approach is to just do a copy paste of the bookmarks. What's wrong with this approach? This approach only works for all visuals but not for bookmarks and field parameters.  If you are not familiar with basics of bookmarks and field parameters do refer to the beginners guide for bookmarks  and introduction to field parameters . Then how do you copy the bookmarks? Power BI enhanced report format (PBIR) for Power BI Project files (PBIP) will help you in achieving this. Let's check it out, I have 2 reports one contains the bookmark called Bookmarks PBIR Test (origin) and other one is Rolling Average PBIR Test (destination) .  Before we get started, you have to enable Power BI Project save option under preview features. Once enabled, restart Power BI desktop. There is a TMDL icon appearing on the left pane. What is TMDL and what's in it for me? There's a lot of possi...

Identify and Delete Unused Columns & Measures

Heavy dashboards and a bad data model is a nightmare for every BI Developer. Heavy dashboards can be slow due to multiple reasons. It is always advised to stick with best practices. Are you still figuring out about those best practices then you should definitely have a quick read on Best Practice Analyser ( link ). One of the most common issues with slow dashboards is unused columns and unused measures.  It is very normal to load some extra columns and create some test measures in your dashboard but as a part of cleanup process those unused columns and unused measures should be removed. Why we are removing them? Because if you keep them then ultimately it will increase the size of your data model which is not a good practice.  How to identify the culprits (unused columns and unused measures)? In today's blog we will provide you with 2 most common external tools which will help you in identifying the culprits. More external tools😒. Who's going to pay for this? To your surprise...

Playing with Totals in Power BI

Are you a fan of matrix visual in Power BI? If you are as I am, I always struggle to get the correct totals and get something else instead of the totals it can be average. After a lot of research and going over different community posts, finally we have found 3 common scenarios that can elevate your matrix to the next level. To start with, I am using Sample Superstore data. Let's first explain the 3 different scenarios that we will tackle - We  would like  to show both Total Sales and Average Monthly Sales across different categories and different periods. We  would like  to show the Average Sales in the row subtotals and Total Sales in the column subtotals. Last and the  most interesting scenario is to show the Total sales excluding the furniture sales in the row subtotals and total sales in the column subtotals. Let's start by getting the correct totals in a matrix. Generally, if  use  basic Sum, Average... functions in your measures then most likely...