How to Add a Card to Display the Total Number of Computers in a Power BI Table

Leonard Suares

Hi Everyone! In this blog post I show you how to add a card in order to display the total number of computers in a Power BI table. It doesn’t matter if you are designing a SQL Server Reporting Services (SSRS) report or a Power BI report, end-users don’t have the time to count the number of items listed in a report. They want to know as quickly as possible the total number of whatever they are interested in. I want to focus on the total number of computers in a Power BI table because it is helpful to show the number of devices affected by your selection and filters.

Add a Card with the Total Number of Computers in a Power BI Table

In this example, I am using Enhansoft Reporting’s SQL Server Power BI dashboard and I am going to show you how I created a card to display the total number of computers.

Total Number of Computers in a Power BI Table - Before

Above is a screenshot of a report page from the SQL Server Power BI dashboard. This particular page displays a List of Computers by SQL Server Version and Edition. On this page, I want to create two Power BI cards. Not only do I want to show the total number of distinct computers, but I also want to display the total number of SQL Server instances associated with these computers.

Total Number of Computers in a Power BI Table - Text Box

The following three steps are what you need to do in order to display the total number of computers in a Power BI table.

Step 1

First, you need to setup a text box in order to display the text. Start by selecting the Text box from the Home ribbon as shown in the above image.

Total Number of Computers in a Power BI Table - Resize Text Box

Once on the canvas, resize the text box in order for it to fit in the desired location. Next, add the text you want in it. In my case it’s, “Total Number of Computers:” Format and align the text accordingly.

Total Number of Computers in a Power BI Table - Text in Text Box

Above is how my text box looks after I formatted and aligned the text. This is the end of step one.

Step 2

The second step involves positioning the card.

Total Number of Computers in a Power BI Table - Card

Start by selecting the Card option from the Visualizations pane.

Total Number of Computers in a Power BI Table - Resize Card

Once on the canvas, similar to what you did with the text box, resize it and position it to the desired location.

Total Number of Computers in a Power BI Table - Text Box and Card

Now you are going to place the text box and the card next to each other ensuring that they appear as one seamless entity (see above).

Step 3

At this point, you must choose the column data you want displayed on the card.

Total Number of Computers in a Power BI Table - Column Data

First, highlight the card on the canvas. Next, select the column from the dataset and drag it to the Fields pane (1). You can see in the above image that I’m counting the total number of computers. Once the selected column is in the Fields pane, click on the down arrow and select the Count (Distinct) option (2).

Keep in mind that you can choose whatever you want to display on the card. Customize it in order to fit your own reporting needs.

End Result

Total Number of Computers in a Power BI Table - Completed Setup

You can see in the above image the completed setup for the two cards (red arrows) and the two text boxes (green arrows) that I created. There’s one for distinct computers and there’s one for SQL Server instances. I positioned the cards in the top left-hand corner, just above the table, and matched all of the fonts and text box sizes in order for them to be consistent.

Total Number of Computers in a Power BI Table - End Result

Above is the finished report. When looking at it for the first time, you see immediately how many computers and SQL Server instances are associated with a specific collection of computers.

Conclusion

How many times have you looked at a report and wondered how many of “x” are there? Follow this easy three-step process whenever you want to add the total number of computers to a Power BI table. This tip, in particular, really helps to give a report a polished look and feel.

Microsoft Power BI provides a number of user-friendly ways to build add-ons for your reports. I hope you can also find many uses for them in order to build great reports. If you have any questions regarding this blog post or Microsoft Power BI, you can reach out to me on Twitter @SuaresLeonard. Until the next time, good luck!

Comments
pingbacks / trackbacks
  • […] I picked this report because next week Garth Jones uses the same one to show you how he adds information about the total number of computers in a SSRS report. It’s a slightly different take on what I just showed you. You won’t want to miss this tip because if, as in the example above, you needed to make changes to 86 SQL databases, how many computers would you need to visit? By the way, last week I showed you how to do the same thing with Power BI in, How to Add a Card to Display the Total Number of Computers in a Power BI Table. […]

Leave a Comment