Renaming a Field in a Single Visualization

If you need to rename a field in a single visualization, you can simply drag the field into the visualization and then click on rename.

But what if you want to rename a field in several visualizations but not all of them.  There is a work around that can get you to this.  You need to create a new measure with a simple formula:

[New Name] = [Measure that you want to rename]

This can then be applied to any visualization that you need to use the alternative name.

Improving Performance of Pages in Power BI

There are several tricks for improving the response time of your Power BI pages.  On of the easiest methods to implement is to limit your table visualizations to a certain number of rows.

By doing this, the visualization renders quicker and it helps your users focus on the most important data points.

There is an option to sum up all the other rows beyond the top N in a category called other, but that will also slow down your performance.

It requires using the Rankx function, which, as admitted by Microsoft’s own blog is the slowest function available in Power BI.

It’s important to evaluate the trade off between performance and functionality when designing your dashboards.

Drilldowns

One of the best features of Power BI is the ability to add drilldowns on data.  This allows the user to dive deeper into certain categories or data points based on the criteria presented in previous reports.  For example, using the Divvy bike sharing data which contains several types of data, I created a pie chart based on day of the week and start station.

Then, right clicking on any of the pieces of the pie allows the user to select see records.  This automatic drilldown allows the user to see a table showing all of the records contain.

To create custom drilldowns, you can add a second page to the Power BI dashboard.  On the newly created page, put the field you want to use to drill through to the last option on the options pane shown below.

 

How to Count Distinct in a Pie Chart

Recently, I created this pie chart based on distinct counts in Power BI.  This was interesting simply because I didn’t think that there would be an difference in my data based on the day of the week, but there it was.  The difference is slight, but surprising nonetheless.

To create a pie chart with distinct counts, I started by selecting the pie chart visualization.  I think added my day field to the “legend” input and added from station to the values option.

To switch from a total value on the from_station, I pressed the small downward arrow and selected “Count (Distinct) as shown in the image below.

My output was the pie chart showing the distinct value counts below.

Formatting a Count in Power BI

In my opinion, Power BI has an odd quirk in which you are unable to format a Count or Count Distinct.  Often when I’m working with large datasets, I have counts greater than 1000 and I would like to use the “,” separator.  Oddly this isn’t allowed as you can see the grayed out option here.

Through some trial and error I have found that there is a simple solution as shown below.  Create a a new measure using a DAX statement.  The measure shown below uses the formula Measure = COUNTX(data,data[day]) which can be formatted.  Problem solved!

Embedding Power BI Dashboard in a Website

Microsoft has made it easy to publish dashboards publicly on the web.  All you need is a completed dashboard and a website destination and you’re set.

Once you’ve completed working on your dashboard and are satisfied with the reports, simply go the the file menu, select publish, and the choose “Publish to Power BI”.   You’ll be asked to save any saved changes prior to publishing.

A pop up window will appear asking for your destination.  By default, Power BI has setup an online workspace for you to publish to.  Select “My workspace” to use the default space.  This sometimes takes a while for the upload to process so be patient.

Once the file is uploaded, you’ll be able to go to powerbi.microsoft.com and find your published dashboard.  After logging in, select Workspaces on the left menu and then Reports on the active window.  You’re report will be there.

For each published report, you’ll have the option of sharing the report.  Clicking on the share button will give you a link to embed the report in your website.

 

 

Editing Interactions Between Visualizations on a Page

Sometimes you want all of the visualizations on a page to change when a single data point is clicked.  This is the default interaction in Power BI.  By selecting any of the sections on one visualization, the corresponding data in other visualizations will be highlighted.  This is a fun feature most of the time.  However, sometimes you do not want all of the visualizations to update.

If this is the case, you can turn off the interactions on specific visualizations.

Start by highlighting a single visualization.

Then go to the Format Menu and select Edit Interactions which is located on the left side:

You will then see additional options displayed at the top of all the other visualizations on the page.   

To stop another visualization from interacting with the currently highlighted one, you simply need to click on the circle with the line through it.

Alternatively, if you have previously turned off the interaction and want to turn it back on, just click on the funnel icon.

Rotating Text Boxes in Power BI

Power BI has added a lot of customization and features and Microsoft continues to roll out new customizations each month.

Though most elements of a Power BI dashboard are meant to be dynamic, sometimes you need a text box with static information.   To insert static information you can select a text box from the Home menu.

You then end up with something like this:

.

But what if you want to rotate the text 90 degrees either for design or clarity’s sake?  Currently this feature is not available in Power BI (surprisingly, you can rotate shapes.)

There is a workaround available.

Simply created a stacked bar chart and hide all the content except the Y-Axis label.  To do this, select a single data field and put it into a stacked bar chart.

Then go to the features menu and turn off all the features except the Y-axis features.

Add a label to the Y-axis that contains the text you want and then minimize the the visualization so that all you can see if the y-axis label.

Then you’ll have this:

How to activate themes in Power BI

Several months ago, Power BI implemented the option to create and import themes in Power BI.  More recently, the options was also added to publish reports using themes.  Both of these are great options for controlling colors in your Power BI dashboards.  I’ve been writing weekly themes for months for Theme Thursdays.

Below are the instructions for activating the themes options in Power BI desktop.

Go to the file menu and select “Options and Settings” then select “Options”.

On the options window, select “Preview Features” in the left hand menu.

Then click the box next to “Custom Report Themes” as shown in the image below.  Note that you will have to exit Power BI and restart the program for the change to take effect.