Welcome to my tenth post in a blog series aimed to provide a revision tool for Microsoft Exam 70-778, and for those looking to increase their expertise in Power BI. In last week’s post, we explored the possibilities developers have to leverage Power BI within their applications and how the Power BI API relates to all this. As we now get into the home stretch, this weeks post combines two exam areas into one. The first topic, all concerning how to Access on-premises data with Power BI, covers the following skills areas:

Connect to a data source by using a data gateway; publish reports to the Power BI service from Power BI Desktop; edit Power BI Service reports by using Power BI desktop.

Then, we’ll look at how to Configure a dashboard and do the following with them:

Add text and images; filter dashboards; dashboard settings; customize the URL and title; enable natural language queries

Power BI Gateway

A typical obstacle that can prevent an organisation from wholly adopting a cloud solution is the need to retain existing on-premise systems. A myriad of potential concerns may be involved here, such as regulatory or contractual arrangements. As a Software as a Service (SaaS) offering, Power BI is no different in this regard, thereby presenting potential obstacles for its adoption. The online element of the solution is designed to interact with data sources that are “in-cloud”, such as Azure SQL databases or Dynamics 365 Customer Engagement. If, for example, you need to access a data warehousing solution residing within an on-premise IBM DB2 instance, this is not necessarily something that can be “opened up” for access.

To address these concerns in a streamlined manner, Microsoft makes available the On-Premise Gateway application, which provides an easy to install and configure way of interacting with on-premise data sources. Built initially with Power BI in mind, the solution is now extended to support by the various services that make up the Power Platform, such as Microsoft Flow and PowerApps. The list of supported on-premise data sources is extensive, covering well-known systems such as:

  • SQL Server
  • Active Directory
  • SharePoint
  • MySQL
  • IBM DB2

A general recommendation when installing the gateway is that the target machine should remain consistently online and have the proper access to all of your on-premise data sources.

To get up and running with the on-premise gateway, you must first download and install the corresponding client from Power BI online, by clicking on the Download button in the top right area of the application (the icon that has a downward arrow and a line):

Clicking this will navigate you to the dedicated information page for the Gateway (which is accessible via a direct link too), where the very obviously placed button will let you download the application:

Once downloaded and installed, some additional configuration is then required:

  • You must specify the type of gateway to deploy – either one that uses the Recommended configuration or one configured for Personal Mode. Recommended will be the one that you generally need to go for, with Personal Mode only being useful for testing purposes or when developing on a local machine.
  • You will need to sign into the Office 365 tenant that contains the Power BI Subscription for your new gateway, making sure that the account in question has sufficient privileges to register one. Once successfully signed in, you can then chose to deploy a new gateway or a replacement one:
  • Next, you will need to define a name for your gateway and also a recovery key. Make sure this is noted down, as you will require it if the gateway requires modification in future. The application should also determine the most appropriate Azure region to associate itself with, but this can be adjusted if needed. Keep in mind though that doing so may make it incompatible with certain services:

With everything configured correctly, you can then confirm the status of the gateway by navigating to the appropriate tab on the application:

Its successful creation can then be verified by going into Power BI Online, where it should be visible in the Manage gateways settings area:

Once implemented, you can then press the ADD DATA SOURCE button to start adding your on-premise connections. The screenshot below shows an example of how to configure access to the WideWorldImporters sample database on an on-premise SQL Server instance:

The gateway is an essential tool to have within your arsenal if you are attempting to leverage the benefits of Power BI Online more quickly, but find yourself restrained by existing, on-premise data sources; once deployed, it straightforwardly allows you to have the best of both worlds.

Publishing Reports

Although it is perfectly acceptable for users to work and interact with their Reports from within the Power BI Desktop application, Reports that typically require more general consumption or utilisation by non-technical audiences will require deploying out to either a) Power BI Online or b) a Power BI Report Server instance. The steps involved in the second one are a little different (and require access to a separate Power BI Desktop application), but for the first route, it is merely just a case of clicking on the Publish icon on the main application ribbon once your Report is ready:

If you have access to several Workspaces within Power BI, you must first specify which workspace the Report will appear in after publishing:

Depending on the size of your Report, this may take some time to upload, but a helpful dialog box will keep you informed on progress:

Once published, you will be provided with a hyperlink that opens the Report within your web browser, where both a new Report and corresponding Dataset will exist:

Once deployed, a Report can be modified in one of three ways:

  • By updating the existing Report within Power BI Desktop and then re-publishing your changes; all current Reports/Datasets will then refresh accordingly.
  • If the original .pbix file is unavailable on your local machine, then you can go to File -> Download report (Previewto get a copy of the file:
  • This can then be modified and re-published in the manner already described.
  • From directly within the Browser. This route provides a similar experience to Power BI Desktop but optimised for browser use. I would not generally recommend altering reports in this manner, especially if your Reports are subject to strict version control policies.

Working with Dashboards

Power BI Reports are similar to books in many ways, in that they cater towards more detailed analysis and precise drill-down capability. For situations where executive or senior level individuals require an at a glance view of the information that is most relevant for their needs, a Dashboard represents the optimal choice to include the data that interests them the most, while still allowing them to drill-down further if required. They also afford additional functionality that assists from a presentation standpoint, by supporting the ability to include images, hyperlinks, videos and even custom streaming datasets.

It is not possible to create Dashboards from within Power BI Desktop. Instead, you must generate them from a Workspace within Power BI online by selecting the + Create button at the top right of the screen, choosing the corresponding Dashboard option and by finally providing an (ideally descriptive) name for it:

You have many different options available when working with a Dashboard, either from an administrative or end-user perspective and these are all accessible from the Dashboard ribbon, shown below and explained in the bullet points that follow:

  • Add tile: Adds various tiles onto your Dashboard, such as web content, videos, custom streaming data sources, images or text boxes.
  • Comments: Displays and lets you add comments to the dashboard, which can be viewed by all other users who have access to the Dashboard.
  • View related: Shows a list of all Reports and Datasets that are associated with the Dashboard.
  • Set as featured: When selected, Power BI will always display this Dashboard first when you login.
  • Favorite: Adds the Dashboard to your favourites list.
  • Subscribe: Allows you to configure email alerts whenever a refresh of data occurs on the dashboard, which will include the Dashboard content and a link to access it. Multiple subscriptions can be set up in this manner. This feature is only available if you have a Power BI Professional subscription.
  • Share: Allows you to share data with other users within or outside your organisation. Once shared, you can then define the access level that these users have – Read or Read and reshare. Access can be revoked at any time. This feature is only available if you have a Power BI Professional subscription.
  • Web view: Lets you toggle between either a Web View or Phone View of the Dashboard, allowing you to verify how the Dashboard renders on different device types.
  • Dashboard theme: Enables you to change the current Theme for the Dashboard. New themes can also be defined using the Custom Theme designer or by uploading a JSON file. If you have already designed your own custom Report theme file, as discussed earlier in this series, then this can be uploaded here too.
  • Duplicate dashboard: Creates a copy of the Dashboard within the current workspace, using a name you specify.
  • Print Dashboard: Lets you print the currently displayed Dashboard to a physical printer or PDF.
  • Refresh dashboard tiles: Forcibly updates all dashboard tiles to return the latest available data.
  • Performance inspector: This will display some KPI type recommendations relating to your Dashboard, advising on elements such as network latency, choice of tiles and other information which is useful when fine-tuning Dashboard performance.
  • Settings: Lets you modify settings for the Dashboard, such as Q&A capabilities, whether Comments are allowed or the default behaviour when moving tiles around. The Dashboard can also be renamed here.

As mentioned already, accessing the + Add tile button on the ribbon shows all the options available for adding content onto your Dashboard:

The next few sections will primarily focus on the three most used options – visualizations from a report, text boxes and images.

Visualizations

Any Report visualization can be pinned to a Dashboard, provided that they exist in a report within the same Workspace. To do this, navigate to the visualization in question and click on the pin icon in its top right corner. You’ll be asked to specify what theme is used for the visualization and also which Dashboard to add it to. Once decided and pinned, you can then navigate to your dashboard to see how this looks:

If there is a requirement to filter a visualization first before pinning it to a Dashboard, then you must do this within the Report, as there is no option to filter visualizations after they are embedded as a tile. A great alternative to get around this is discussed on the PowerDAX website, which involves the use of slicers.

Text Boxes

This tile type should be reasonably self-explanatory, but it is worth highlighting the additional options available here:

  • Titles/subtitles can be specified and, optionally, displayed.
  • Text can be rendered using rich-text editor capabilities.
  • It is possible to add a hyperlink to an external link, another Dashboard or a Report page, that redirects users accordingly after clicking the tile.

Images

The list of available properties when configuring an image tile is mostly the same as text boxes. The picture you wish to display must derive from a Web URL; there is no option to upload an image file. A good candidate for hosting any image could include a publically available OneDrive folder or an Azure Blob Storage location:

Rearranging Dashboard Content

It is possible to drag, drop, shorten and widen tiles on a Dashboard at any time. The two screenshots below show how it is possible to do this to suit any potential layout requirement you may have:

Key Takeaways

  • The Power BI On-Premise Gateway provides a streamlined route to working with non-cloud data sources within Power BI, Microsoft Flow and PowerApps. As a lightweight and easy-to-configure client application, it supports a wide variety of data sources, making them accessible as if they were in the cloud. Once set up, corresponding Data Sources are then made available for configuration and for leveraging as part of any Power BI Dataset.
  • Reports can be published into Power BI Online, meaning that they become accessible online and to a broader group of users, without requiring access to Power BI Desktop. Reports need deploying into a Workspace, which can be created manually or derived from an Office 365 Group. Each Report contains a corresponding Dataset, where all queries defined within Power BI Desktop exist.
  • Reports that already exist on Power BI Online can be updated by just publishing a new version of the Report from Power BI Desktop. It is also possible to modify Reports from directly within the browser and by downloading a copy of the .pbix Report file as well, which can then be altered and re-published.
  • Dashboards provide a means of grouping together various content as tiles, designed for at-a-glance analysis and optimal end-user experience.
  • The list of content that can be pinned to a Dashboard includes:
    • Visualizations
    • Web content
    • Images
    • Text boxes
    • Videos
    • Custom streaming data
  • Pinned content can be re-arranged on Dashboard via drag and drop functionality. It is also possible to resize tiles to any given height/width.
  • Within the settings of a Dashboard, it is possible to enable/disable features such as natural language queries (Q&A’s) and Notes.
  • Some features of a Dashboard are only available if you have a Power BI Professional subscription, such as sharing and email subscriptions.

We’ve covered a lot in today’s post and jumped around two distinct functionality areas within Power BI, both of which have arguable importance in their own rights. Next weeks post will hopefully be a lot easier to digest, as we evaluate the options available to publish Power BI Reports to a variety of locations, such as for public access or within SharePoint.

Welcome to post number nine in my series designed to provide a revision tool for Microsoft Exam 70-778, and for those looking to increase their expertise in Power BI. The topics we have covered so far in the series have all involved Power BI Desktop primarily, and we now move away from this as we evaluate how to Manage Custom Reporting Solutions with Power BI. This focus area for the exam measures the following skill areas:

Configure and access Microsoft Power BI Embedded; enable developers to create and edit reports through custom applications; enable developers to embed reports in applications; use the Power BI API to push data into a Power BI dataset; enable developers to create custom visual.

Despite being, at first glance, a very technically focused area, it is not necessarily a requirement for the exam to know how to work with these features in-depth. However, what this post will try to do is fully explain what Power BI Embedded is (and how it can be tailored accordingly), the capabilities and benefits of the Power BI API and, finally, what options you have available to build custom visualizations, that are then available for use across any Power BI Report.

Power BI Embedded

A potential limitation of using Power BI as your Business Intelligence solution is that you must access your reporting solution through one of the two interfaces, depending on how you have licensed the product:

For strictly organisational only access, this is all fine and dandy; but if you desire to grant external users access to your reports, it would be necessary to open up a door into a critical component of your IT infrastructure, often in tandem with any other systems your solution may contain. For example, if you have developed a support portal for your customers to submit cases with and wish to provide them with a range of Power BI visualizations, you would need to grant and deploy access to two, separate application instances – your support portal and Power BI Online/Report Server. This can lead to a jarring end-user experience and severely limit your capabilities in providing a unified, bespoke and branded solution.

Power BI Embedded seeks to address this scenario by providing application developers the means to embed Power BI reports and visualizations directly within their existing applications. The experience this offers is seamless, to the extent that end-users will not even need to know that you are using Power BI at all. Consequently, this potentially allows you to look exceptionally gifted when you begin to deploy engaging and highly interactive visualizations into your application quickly. As an Azure-based service with a pricing mechanism to suit, you only need to suitably estimate your potential compute capacities, deploy your capacity and any corresponding reports and then build out the appropriate link to your Power BI content within your application.

To get started with using Power BI Embedded, you need to make sure you have the following at your disposal:

To get a feel for the capabilities on offer as part of this offering, you can go to the Power BI Embedded Playground, made available courtesy of Microsoft. This tool allows you to test how the various Power BI Embedded components render themselves, tweak around with their appearance and generate working code samples that are usable within your application. The screenshot below shows an example of how a single Report visual would look when embedding it into a bespoke application:

As the screenshot indicates, there is no loss in core functionality when consuming Power BI in this manner. You can hover over individual areas to gain insights into your data; you can drill-down through the data; data is sortable in the conventional manner; and, finally, you can view the underlying data in the visualization or even export it out into an Excel/CSV document. Also, you have extensive options available that can be used to modify how a visual, report etc. is rendered on your application page, allowing you to ensure that all rendering completes most optimally for your application.

All in all, Power BI Embedded represents a significant boon for application developers, enabling them to very quickly leverage the extensive reporting capabilities Power BI  provides, all of which is cloud-based, highly scalable and minutely tailorable. It is important to highlight that all of this goodness comes with a potentially high cost, namely, that of requiring a sufficiently proficient application developer (preferably .NET focused) to join all of the various bits together. But, if you are already in the position where you have developed an extensive range of Power BI reports for consumption by your customer base, Power BI Embedded is the natural progression point in turning your solution into a real piece of intellectual property.

The Power BI API

If you are finding your feet with Power BI Embedded and need to look at carrying out more complex actions against Power BI content that is pulling through from a workspace, then the API is an area that you will need to gain familiarity in working with too. Microsoft exposes a whole range of functionality as part of the Power BI API, that can assist in a wide variety of tasks – such as automation, deployment and allowing any bespoke application to further leverage benefits out of their Power BI embedded solution. Some examples of the types of things you can do with the API include:

The API requires that you authenticate against the Power BI service, using a corresponding Application Registration on Azure Active Directory, which defines the list of privileges that can be carried out. This component can be straightforwardly created using the wizard provided by Microsoft, and a full tutorial is also available on how to generate an access token from your newly created Application Registration. The key thing as part of all of this is to ensure that your Application Registration is scoped for only the permissions you require (these can be changed in future if needed) and not to grant all permissions needlessly.

Because the API is a REST endpoint, there are a variety of programming languages or tools that you can use from an interaction standpoint. PowerShell is an especially good candidate for this and, in the snippet below, you can see how this can be used to modify the User Name and Password for a SQL Server data source deployed onto Power BI Online:

#Make the request to patch the Data Source with the updated credentials

$sqluser = "MyUserName"
$sqlPass = "P@ssw0rd!"

$patchURI = "https://api.powerbi.com/v1.0/myorg/gateways/cfafbeb1-8037-4d0c-896e-a46fb27ff229/datasources/1e8176ec-b01c-4a34-afad-e001ce1a28dd/"
$person = @{
    credentialType='Basic'
    basicCredentials=@{
        username=$sqluser
        password=$sqlpass
        }
}
$personJSON = $person | ConvertTo-Json
$request3 = Invoke-RestMethod -Uri $patchURI -Headers $authHeader -Method PATCH -Verbose -Body $personJSON

This example deliberately excludes some of the previous steps needed to authenticate with Power BI and is, therefore, provided for strictly illustrative purposes only.

Creating Custom Visuals

Developers have access to primarily two options when it comes to building out bespoke visualizations, which are then includable in a Power BI Online, Embedded and Report Server report:

Last week’s post discussed this topic in more detail from an exam standpoint which, in a nutshell, only requires you to have a general awareness of the options available here; no need to start extensively learning a new programming language, unless you really want to 🙂

Key Takeaways

  • Power BI Embedded is an Azure hosted offering that allows you add Power BI Report content into bespoke applications. This deployment option can be incredibly useful if you wish to make available your Power BI solution to users outside of your organisation or if you have an existing, bespoke application system that can benefit from utilising Power BI content. An Azure subscription is required to begin working with Power BI Embedded and you are billed based on node size, not individual user licenses. All Power BI content requires publishing to the online service before its contents become available for Power BI Embedded to access. Report developers will, therefore, need granting a Power BI Professional license to carry out these activities.
  • The Power BI API grants access to developers to perform automation or administrative actions programmatically against the Power BI Online service. Utilising a REST API, developers can determine the optimal programming language of choice to interact with the API, allowing them to streamline the deployment of Reports or Dashboards to the Power BI service or leverage additional functionality when utilising Power BI Embedded. The API can also cater to specific data load requirements, although more complex needs in this area would require addressing via alternate means (SSIS, Azure Data Factory etc.)
  • Developers can add their own bespoke visualizations to a Power BI Report by either developing them using Node.js or using the R language. The first of these options facilitate a more streamlined deployment mechanism and allows developers to add their visualizations to AppSource, whereas the second option may be more useful for complex visualization types with an analytical or statistical function.

Compared to the other exam topics, a general awareness of these concepts is more than likely sufficient from a learning perspective and is (arguably) useful knowledge in any event, as it allows you to understand how developers can further extend a Power BI solution to suit a particular business need. In next weeks post, we will move into the final subject area for the exam, as the focus shifts towards how to work with Power BI outside of the Desktop application and the various tools available to integrate on-premise data sources into Power BI Online.

Happy New Year! As 2019 dawns upon us, Microsoft Business Application professionals start in the right place, as the concept of the Power Platform starts to take hold. Through this, it is pleasing to observe more consistency across these range of products, with regular releases, increased integration and better learning tools, provided directly from Microsoft. I’ve mentioned this previously on the blog, but it is worth emphasising again the increased importance Power BI has from a Dynamics CRM/365 Customer Engagement standpoint. With this in mind, having a New Years resolution to learn more about it and to earn a technical qualification in the subject will hold you in good stead in future. If you are reading this now, then hopefully you already have this resolution. 🙂

Today’s post will continue my series focused on providing a revision tool for Microsoft Exam 70-778. This week, we move into the broad subject area Create and format interactive visualizations, which revolves around the following skill areas:

Select a visualization type; configure page layout and formatting; configure interactions between visual; configure duplicate pages; handle categories that have no data; configure default summarization and data category of columns; position, align, and sort visuals; enable and integrate R visuals; format measures; Use bookmarks and themes for reports

Let’s start by providing an overview of just what a visualization is, before deep-diving into the specific topic areas listed above. The examples provided in this post refer to the latest Power BI Desktop sample report 2018SU12 Blog Demo – December.pbix, which can be downloaded from GitHub using this link.

Visualization Overview

The majority of topics covered in this series have all concerned the foundations of a successful Power BI report – the data sources, the data quality enhancement work and the required DAX wizardry to create custom columns, Measures or table objects to supplement any requisite Power Query manipulation. With the necessary foundations, walls and various utilities built for your Power BI “house”, the final and most important topic concerns the decoration – creating impactful and meaningful visualizations that help to display your data most appropriately. The great thing about using Power BI as your Business Intelligence tool is the vast array of default and custom visualizations that are available when developing a report. The Visualizations pane on the Report tab lists all of the possible visuals available for your report, described further in the list that follows (in order, left to right, top to bottom):

  • Stacked bar chart
  • Stacked column chart
  • Clustered bar chart
  • Clustered column chart
  • 100% stacked bar chart
  • 100% stacked column chart
  • Line chart
  • Area chart
  • Stacked area chart
  • Line and stacked column chart
  • Ribbon chart
  • Waterfall chart
  • Scatter chart
  • Pie chart
  • Donut chart
  • Treemap
  • Map
  • Filled map
  • Funnel
  • Gauge
  • Card
  • Multi-row card
  • KPI
  • Slicer
  • Table
  • Matrix
  • R script visual
  • ArcGIS Maps for Power BI

Power BI also supports custom visuals, provided by ISV’s or Node.js developers, that allow you to include additional visualizations in your report. You can work with these by clicking on the ellipsis icon on the Visualizations pane:

There are two web links relating to custom visuals that are worth considering further:

  • The Business Apps marketplace, accessible also via the Import from marketplace button, lets you either add new custom visuals directly into Power BI or download versions that you can then import using the Import from file button. There are a lot of great visuals available here, that can help to supplement your existing reports and take some of the aggravation out when implementing more complex requirements (e.g. displaying Gannt chart visuals).
  • The Developing a Power BI custom visual Microsoft Docs Tutorial walks you through the required steps to build out a custom visual using Node.js.

Just dragging and dropping a visual onto a report and adding a few field values may not be enough to meet a specific business requirement. For this reason, you should consider the following when working with visualizations:

  • Does the visual require sorting in ascending, descending or by a particular column order? If so, then clicking on the ellipses button at the top right of the visualization will expose several sortation options, which may differ based on the underlying dataset:
  • Are there blank categories within your data? If so, you may encounter a similar issue as indicated in the screenshot below, with a (Blank) category value:
  • Resolutions to this problem can vary – for example, you could go back into your query and add a default value for all blank columns values – but a quick way to potentially fix this is to click on the down arrow next to the field and select the Show items with no data option:
  • Does the default summarization need to be overridden for the Values field? We’ve seen previously in this series how it is possible to specify the default summarization for each column in your dataset. On occasions where this needs changing, you can again use the right arrow next to the field to carry this out:

Finally, you also have some additional options available by selecting the Format tab with a visual selected:

The options above the Arrange heading should be self-explanatory, but it is worth focusing on the Edit interactions button. An expected experience with Power BI is, as you begin to filter visualizations, others on the report update accordingly by applying the same filter. This behaviour can be changed using the Edit interactions button, allowing you to specify whether other visuals on the report:

  • Apply a cross-filter
  • Apply a cross-highlight
  • Do nothing

The default action for most visualizations is to apply a cross-filter. The sequence below demonstrates how this can be disabled using the Edit interactions button:

A handy feature to have at your disposal, further details regarding the Edit interactions button can be found on the Change how visuals interact in a Power BI report Microsoft Docs article.

Deciding Which Visualization To Use

Both for a real-life and exam scenario, you should be prepared to identify when a visualization will be appropriate to use, based on a stated list of requirements. As a general rule of thumb, if:

  • You need to compare data between different categories, then use a Bar/Column or Ribbon Chart.
  • The requirement is to compare data values across a date range, then use a Line or Area Chart.
  • You are working with a dataset that contains multiple fields with wide value ranges, then use a Combo Chart.
  • There is a need to show significant variances across a set of data or to highlight significant amounts in comparison to others, then use a Waterfall Chart.
  • You are working with two metrics that have a relationship between them and you need to visualise diverse value types, then use a Scatter Chart.
  • Data needs to be grouped by a distinct category and shown as part of a whole value, then use a Pie or Doughnut Chart.
  • The requirement it to distinctively show proportions of an overall part and, by association, the most significant/smallest contributors, then use a Treemap visualization.
  • Your data is geographically based, and there is a desire to provide drill-down capability, then use a Map, Filled Map or ArcGIS Maps for Power BI visualization.
  • You are working with data based on distinct stages (e.g. Lead data from Dynamics CRM/365 Customer Engagement, grouped by Business Process stage), then use a Funnel visualization.
  • The data needs to be consumed via a single value or viewed as represented in the underlying data, then use a Card, Multi-Row, Table or Matrix visualization.
  • There is a need to provide users with the capability to filter data “on the fly”, then use a Slicer visualization.
  • An R script requires incorporation into your report, use an R visualization (discussed in further detail later on in this post).
  • You need to report data concerning Key Performance Indicator (KPI) monitoring, then a KPI or Gauge visualization should be chosen. These are both discussed in greater detail in my previous post on this subject.

Report Page Options

Visualizations form an essential part of the look and feel of a report, but further options are also available from a report design perspective. With a report page selected and with the Format paintbrush icon chosen (which is accessible in the same way as described in section Visualization Format Settings in my post concerning KPIs), you have access to additional options relating to the currently selected page:

The options available here include:

  • Page Information: Here, you can change the name of the page, as well as enable/disable the Tooltip and Q&A features for this page.
  • Page Size: The options here let you adjust the size of the page to one of several options:
    • 16:9 (1280 x 720)
    • 4:3 (960 x 720)
    • Cortana (296 x 592)
    • Letter (816 x 1056)
    • Custom
  • Page Background: From here, you can change the background colour of the page and adjust its transparency. It is also possible to add a background image here too.
  • Page Wallpaper: Potentially confusing when compared against the Page Background options, the options in this section let you adjust the colour outside of the main page area. The best way of understanding how this looks is to take a look at the following garish example, which shows a page that has had both background and wallpaper colours specified:

Never develop a report that looks like this, by the way. 🙂

When it comes to working with multiple pages, you also have the following options available, accessible through right-clicking a page:

Formatting Measures

Measures, as with other column types (derived either from a query or a DAX formula), can be formatted in numerous different ways. The steps involved here do not differ significantly from the options discussed in the Formatting Columns section of my previous post concerning data model optimisation; select the Measure in question from the Fields pane, navigate to the Modeling tab and the appropriate options will be made available to you.

R Visuals

R provides developers with the means of building highly sophisticated and bespoke visualizations, that will typically be consumed for statistical analysis. These can be added to Power BI Desktop and linked to any data source in your report. There are two necessary components required to start working with R visuals in this manner:

  • You must install R on your local machine. There are many versions available, with R Open 3.5.1 from Microsoft being the logical choice for beginners.
  • Within the Options area of Power BI Desktop, you must verify that the correct Detected R home directories dropdown is selected. If you have installed R Open 3.5.1 on your machine, then this should be filled for you automatically, as follows:

(You may also be prompted to Enable script visuals, as indicated by the dialog box below; ensure that the Enable option is selected)

Beyond the basics of getting started with R in Power BI, which is all that is required from an exam perspective, this is a topic too complex to cover in this blog post.

Bookmarks

The ability to pre-configure a report page, from a filtering standpoint, can be incredibly useful for those who consume a Power BI report. Bookmarks seek to address this need, by allowing developers to build a guided “story” in their report. All that is required is for a report page to be filtered accordingly and then for a Bookmark to be added – couldn’t be simpler! For example, the 2018SU12 Blog Demo – December.pbix sample report contains several Bookmarks, accessed by opening the Bookmarks Pane on the View tab:

With the Selection pane also enabled, you can then easily navigate between all Bookmarks by clicking the View button above and using the arrow icons on the bottom of the page:

Through the Bookmarks pane, it is also possible to re-order Bookmarks and to group them by a category, such as a page. Simple to setup, but powerful when utilised, they are a feature which I think gets overlooked and should be considered if you are building out a report for beginner Power BI users.

Themes

A feature that has typically been available with every Microsoft Business Intelligence (BI) application is extensive design capabilities, atypically to suit any bespoke branding requirements that an organisation may have. Power BI is no different in this regard, because, as well as being able to specify the colour of visualizations individually, developers also can define a top-level Theme that will automatically apply to all report visualizations. The Switch Themes button provides users with the ability to modify their Report theme at any time, located on the Home tab:

As shown in the image above, you can:

  • Change the Theme from Default to one of the other include Theme definitions within Power BI, such as Electric or High Contrast.
  • Add a custom Theme to your report using the Import theme button.
  • Browse the Power BI Community Theme gallery to download a custom Theme developed by someone else.
  • Get additional help on theming through the How to create a theme button, which links to the Use Report Themes in Power BI Desktop support article.

The ability to import and develop bespoke Themes is a topic that requires further discussion. All Themes are defined as JSON files, which outline the different hex colour values that Power BI allocates for each visualization type. There is a hell of a lot of options available here, depending on how masochistic you are feeling stringent your branding requirements need to be. For the exam and most real-life scenarios, a straightforward JSON file (provided courtesy of Microsoft) may resemble the below:

{
    "name": "St Patricks Day",
    "dataColors": ["#568410", "#3A6108", "#70A322", "#915203", "#D79A12", "#bb7711", "#114400", "#aacc66"],
    "background":"#FFFFFF",
    "foreground": "#3A6108",
    "tableAccent": "#568410"
}

Once saved as a file with the name St Patricks Day.json and imported into the sample 2018SU12 Blog Demo – December.pbix report, we get this rather…distinctive look:

The options available with Themes are always worth keeping in the back of your mind and, chances are, they can provide the means towards ensuring consistently branded Power BI reports.

Key Takeaways

  • Power BI delivers, out of the box, a range of different visualizations that cater towards most (if not all) reporting requirements. Should you find yourself in need of additional visualizations, then Microsoft AppSource is your go-to destination for finding visualizations developed by others. If you have experience working with either Node.js or R, then these can be used to build bespoke visualizations also.
  • When first developing a report, you should be able to match a requirement for a specific visualization type, to ensure that you are delivering a solution that is both meaningful and useful. From an exam perspective, this becomes a more critical consideration, and you should be prepared to suggest the most optimal visualization to use when given a specific scenario.
  • After adding visualization’s to your report, you have additional options available to customise them further. For example, you can specify a preferred sorting order for your data, override any summarizations used and move/align your visual on the report page.
  • By default, visualizations in Power BI are designed to change automatically, based on how users interact with the report. All of these options are controllable via the Edit interactions button, allowing you to specify your preferred cross-filtering and cross-highlighting conditions.
  • There is a range of report page customisation options available to developers. It is possible to resize a page to any possible height/width, allowing you to optimise your report for specific devices. Also, you can modify the colour of a page (or its wallpaper) or add an image instead. Pages can also be renamed, reordered or duplicated.
  • Measures can be formatted in the same way as calculated columns, meaning you can specify a data type or, for numerics, modify the number of decimal places.
  • Bookmarks allow developers to set up “checkpoints” within a report, based on how a report page has been filtered. These can then be used to automatically navigate the user through a report, applying these filtering steps automatically. This feature can help transform your report into an interactive story.
  • Visualizations will automatically inherit their various colour properties from the currently selected report theme. Although these can be modified granularly, the fastest and most consistent way of making these changes en masse is to change the Theme. Power BI includes some Themes out of the box, but you also have the option of building your own using a custom JSON file; this can then be imported into different reports, providing a portable means of enforcing a particular branding requirement.

Visualizations are a HUGE topic for the exam, with a lot of detail that requires careful consideration. I hope this post has provided the right balance between highlighting the most critical areas, without going into minute detail. I would, therefore, urge you to go away and carry out studying yourself to gain a greater appreciation of this subject area. Next weeks post will be somewhat lighter reading, as we take a look at how application developers can integrate Power BI within their existing apps.

The New Year is almost upon us, meaning its time to put in place some resolutions for the year ahead. I can think of no better commitment then to learn more about Power BI in 2019, which is hopefully the reason why you are reading this right now 🙂 . Welcome to the eighth post in my series concerning Microsoft Exam 70-778, where I hope to provide a learning/revision tool for anyone who is taking the exam or looking to increase their Power BI expertise. Last week, we investigated how to manage Key Performance Indicator (KPI) reporting using Power BI. We now move into another topic area that is also tied closely to visualizations – Create hierarchies. The related skills for this exam area are:

Create date hierarchies; create hierarchies based on business needs; add columns to tables to support desired hierarchy

In the sections that follow, I will provide an overview of the two different types of Hierarchies configurable within Power BI, before then providing a step-by-step guide on how to create one. As with previous posts in this series, this subject does bring together some other skill areas, such as importing data with Power Query and using DAX calculated columns. Knowledge of these topics will hold you in good stead when starting with hierarchies.

What is a Hierarchy?

Hierarchies form the cornerstone of a broad aspect of human existence, which makes it natural they are a common theme when it comes to Business Intelligence (BI) solutions. A hierarchy is definable as a logical, often visual, representation of an order of precedence. Hierarchies, in strict Power BI terms, do not differ much from this general definition; they allow developers to order data by preference, priority or anything in between. When configured and used in isolation, they offer minimal benefit to Power BI report consumers. They start to become really valuable when utilised alongside visualizations, providing an additional interaction point for key data points and allowing report users to tailor a visualization to suit their needs. Some potential usage scenarios for hierarchical data may include:

  • Providing top-level and subcategory classifications for product records.
  • Modelling a business reporting line hierarchy, from CEO down to Developer.
  • Splitting sale date by quarter, year or even month.

Hierarchies come in two flavours within Power BI – Date Hierarchies and Custom (or User Defined) Hierarchies. The next two sections delve deeper into the inner workings of each.

Date Hierarchies

Date Hierarchies are best described as a logical breakdown of the constituent components of a date value, based on four different levels:

  • Year
  • Quarter
  • Month
  • Day

For each field that contains a Date Hierarchy, the appropriate value for each of the above is exposed out for utilisation across Power BI Desktop. So, for example, the underlying hierarchy values for the 3rd March 2017 would be:

  • Year: 2017
  • Quarter: Qtr 1
  • Month: March
  • Day: 3

All columns with a data type of Date or Date/Time will have a Date Hierarchy created for them automatically. The hierarchy will then become accessible for use in the following areas of Power BI Desktop:

  • When building out formulas using DAX. For example, the screenshot below shows how it is possible to access the hierarchy field values listed above from the Date/Time field LastEditedWhen:
  • When working with a Table visualization. Adding a Date or Date/Time column into the Values well will automatically create a table containing all of the hierarchy fields. An example of how this looks for the LastEditedWhen field is seen in the image below:

It is possible to disable the automatic creation of Date Hierarchies within the File -> Options area of Power BI Desktop, by toggling the Auto Date/Time option. Take care when toggling this though, as doing so will remove any existing Date Hierarchies within your model:

This fact is confirmed when returning to the Table created using the LastEditedWhen field, which automatically reverts to the base column value when the Auto Date/Time option is disabled:

Custom Hierarchies

For more bespoke requirements, a Custom Hierarchy affords the same kind of functionality discussed in the previous section. They can be created from the right-hand Fields pane by selecting a field within a Power BI table and choosing the New hierarchy option:

Once established, you can then:

  • Rename the hierarchy. By default, it will be named using the convention <Field Name> Hierarchy.
  • Include additional fields by dragging and dropping them into the hierarchy.
  • Reorder the hierarchy, by dragging and dropping the fields into your preferred order, from top to bottom.
  • Delete the hierarchy through right-clicking it and selecting the Delete option. All fields included in the Hierarchy will remain as part of the underlying query.

A Custom Hierarchy typically relies on a self-relationship that a query might have on itself. An excellent example of this, already alluded to, is an Employee table, where an individuals Manager is trackable via a ManagerID column, that resolves back to an EmployeeID record. In these cases, there are several DAX functions available that will assist in getting custom columns set up to support your hierarchy, described collectively as Parent and Child Functions. Usage of these functions is essential when building out Hierarchies involving parent/child relationships.

The exercise at the end of this post will go through the detailed steps involved in creating a Custom Hierarchy.

Using Hierarchies with Visualizations

A good reason to include hierarchies as part of your Power Bi Reports is the options they unlock from a data drill-down perspective. We’ve seen already the behaviour Date Hierarchies adopt when using the Table visualization, which offers nothing in this respect. Other visualization types support, by comparison, far richer options for “homing in” on a particular piece of data, epitomised by the following buttons that appear at the top of the supported visualization:

In order, from left to right, these let you:

  • Drill up your data one level in the hierarchy.
  • Enable the Click to turn on Drill Down feature, allowing you to click on any part of a visual to drill-down to the next level of the hierarchy.
  • Go to the next level in the hierarchy.
  • Expand all down one level in the hierarchy. This behaves differently to the Click to turn on Drill Down option mentioned already, by grouping together the previous hierarchy level each time you drill-down.

An example of how all this works as part of a Pie chart visualization is viewable in the sequence below:

As should hopefully be clear, hierarchies are very much the icing on the cake in building an engaging and wholly interactive reporting solution within Power BI.

Example: Creating a Hierarchy and adding it to a Visualization

The steps that follow provide instructions on how to build out a product categorisation hierarchy, using sample data, and then how to apply this to a Donut chart visualization. All that is required to work through these steps is access to the Power BI Desktop application:

  1. In Power BI Desktop, click on Edit Queries to open the Power Query Editor. Navigate to the New Source button and select the Blank Query option:
  2. Select the newly created Query1 in the Queries pane and click the Advanced Editor button. Copy and paste the following M code into the window and press Done:
    1. let
          Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("nZNNbsMgEIWvgrxqJRb438mybZZRonrpZoGScYNiYwvsqu11epOerBjstHKwE3WBhJj3vjdoIMsc18HO4/MabXjBOCzRijcgasEkoDtJy7qA+5sUgVrfXwEOCXF2OHO8kWsrqhykZBWnxRR5SmPYHo6jRLP9kS9tKD9QcZji2uqGGeE4cTUz6D0piDe2v7i85ThSS1tDtVm974+Uv0Kf+Vc3Uzojus0mz7sEPwptafPVgROPlC1rJinj2sBIfnVPIE9NVVsIlsrgX1yq8kqgNTtI9gnopSXEiyZe0X99iZ5mgheumaZL7LC0pEWBHlqpBiGlenBQsra80sF1k4kPfM+Ed38qPVIB24rxxjL32WKkYS4h2Pf623SfKT191KD7OXdiAd8iMgEhDn2F3/0A", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type text) meta [Serialized.Text = true]) in type table [ProductID = _t, Name = _t, #"Product ID" = _t, Parent = _t, TotalSales = _t]),
          #"Changed Type" = Table.TransformColumnTypes(Source,{{"ProductID", Int64.Type}, {"Name", type text}, {"Product ID", type text}, {"Parent", Int64.Type}, {"TotalSales", Currency.Type}}),
          #"Replaced Value" = Table.ReplaceValue(#"Changed Type",null,0,Replacer.ReplaceValue,{"TotalSales"})
      in
          #"Replaced Value"
      
  3. This will then load up a table object that resembles the below, which derives from the sample Product data from Dynamics CRM/365 Customer Engagement:
  4. Right-click the Query1 query and use the Rename option to change its name to Products. Select the Close & Apply button to exit the Power Query Editor.
  5. Open the Data pane, select the Products query and use the following DAX formulas to create New Columns for the table:
    • ProductHierarchy = PATH(Products[ProductID], Products[Parent])
    • Product Category = LOOKUPVALUE(Products[Name], Products[ProductID], PATHITEM(Products[ProductHierarchy], 1, INTEGER) )
    • Product Grouping = LOOKUPVALUE(Products[Name], Products[ProductID], PATHITEM(Products[ProductHierarchy], 2, INTEGER) )
    • Base Product = LOOKUPVALUE(Products[Name], Products[ProductID], PATHITEM(Products[ProductHierarchy], 3, INTEGER) )
  6. The first field creates the required hierarchy list in a delimited format; the remaining columns then list out the three levels of the hierarchy as separate column values. The data in your table should resemble the below if done correctly:
  7. Right-click the Product Category field in the Fields pane and select New Hierarchy, to create a new hierarchy as indicated below:
  8. Modify the newly created hierarchy so that:
    • It is named Product Hierarchy
    • It contains, in addition to the Product Category field, the Product Grouping and Base Product fields.
    • The order of the newly added fields reflect the following:
      • Product Category
      • Product Grouping
      • Base Product
  9. If done correctly, the Hierarchy should resemble the following:
  10. Click on the Report tab and add an empty Donut chart visualization to the report. Populate the Field well values as shown below:
  11. The Donut chart should update accordingly, and with the appropriate drill-down options available at the top of the visualization. Notice also that hovering over each section of the Donut chart displays an aggregated total for that level of the hierarchy:

Key Takeaways

  • Hierarchies within Power BI provide a means of logically categorising data into an order of preference or precedence, providing greater flexibility to Power BI report users when they interact with visualizations.
  • Date Hierarchies are created and managed automatically by Power BI for each Date or Date/Time field defined within your model. These automatically create fields that contain the Year, Quarter, Month & Day values from the respective date fields. These fields can then be utilised as part of a Table visualization or within a DAX formula. Date Hierarchies can also be completely disabled if required.
  • Custom (or User-Defined) Hierarchies need to be created manually and provide additional customisation options when compared to Date Hierarchies, such as the number of fields they contain, the order and its name. A Custom Hierarchy will typically make use of one of several Parent/Child DAX functions, such as PATH or PATHITEM.
  • Including a hierarchy as part of a chart visualization, such as a Pie chart or Donut chart, opens up other drill-down capabilities around your data. Indicated by the additional arrow icons included at the top of the visualization, they provide the means for users to interrogate data points that interest them the most straightforwardly.

The past couple of posts have already started to introduce some of the visualization options available within Power BI. In next week’s post, we will take a much closer look at all of the options available within the application to display data, as well as look at features such as Bookmarks and the various report page customisation tasks available to developers when building out a report.

As we move into the festive period, now is the time to put your feet up, relax, take stock for the year ahead…or, if you are reading this over Christmas, grab the opportunity to learn more about Power BI 🙂 . In the seventh post in my series concerning Microsoft Exam 70-778, we move away from the suitably large subject area of DAX into a topic much more visually focused and accessible – Measure performance by using KPIs, gauges and cards. The related skills for this exam area are:

Calculate the actual; calculate the target; calculate actual to target; configure values for gauges; use the format settings to manually set values

As part of this week’s post, I hope to delve deeper into each of these skill areas, with the aim of providing a revision tool for the exam or a general learning aid for those getting to grips with Power BI for the first time. To follow on as part of any examples that follow, make sure you have downloaded the WideWorldImporters sample database and hooked up Power BI Desktop to the tables described in my first post in this series.

KPI Overview

A standard reporting requirement, and one which typically forms the basis of any contractual performance monitoring is the studying of Key Performance Indicator (KPI) figures. These are designed to provide an executive level view to answer questions such as “How is our sales pipeline progressing?” or “Have we met our objectives to reduce the number of monthly complaints down to X number?“. The whole process of collating together diffuse data sources to present this information may, in the past, have been exhausting. With Power BI, it is possible to deploy a dedicated KPI visualization that allows you to straightforwardly and consistently report headline figures, track variance over time and receive immediate visual cues to flag up any potential issues.

To get going with your first KPI visualization, you must supply two critical pieces of data:

  • Indicator: This is the “actual” value that needs reporting against a target, and will typically be some form of aggregation contained within a Measure.
  • Trend axis: Representing the performance of your indicator based on a range of data, the most typical axis type to use here would be some form of date value – such as month or year.

A KPI configured with just these two properties will work but looks…well…bland and not very useful at all:

This is why a Target Goal should additionally be specified. Adding this will allow for the appropriate colour to be applied to the visualization, to indicate how well the Indicator is performing against your target. The great thing about this is that up to 2 Target Goal values can be specified if needed. You potentially lose some functionality here, as the Distance percentage value will no longer display correctly; but this may be useful if, for example, you have an aspirational target that there would be a benefit in hitting, but is not a strict requirement. When the value of one Target Goal is determined to be fulfilled, but the other isn’t, the Visualization will display Amber by default, as indicated below:

The example at the end of this post will walk through the steps involved in setting up a KPI.

Gauge Visualizations

We got a sneak peek into Gauge’s when working with What-If Parameters in last week’s post, but a more in-depth discussion regarding them is necessary. Gauges provide a different means of viewing how a subset of data is performing against a target. They differ from KPI’s primarily due to the additional configuration options they afford and the potential they have to provide a faster means of interacting with key data points on the visualization. The configurable field well properties for a Gauge is viewable below, in the screenshot and descriptive bullet point provided:

  • Value: This is the value that requires tracking, similar to the Indicator within KPI’s.
  • Minimum value: The minimum amount that needs to be hit by the Value before the Gauge will be filled in.
  • Maximum value: The maximum amount that needs to be hit by the Value before the Gauge stops filling (i.e. a Gauge with a Value of 105 and a Maximum value of 100 would display as full).
  • Target value: The target that needs hitting, which will be presented as a black line on the Gauge, as shown below:
  • Tooltips: These are additional field values that will be displayed to the user when hovering over the Gauge. These fields can either be aggregated variants of columns or a Measure.

Gauges behave differently from KPI’s in that they will “work” with only one field well specified. For example, adding a Measure with a value of 8 million as the Value will display a half-full Gauge, as indicated below:

Notice that, in this scenario, the Gauge assumes the maximum amount to be double of what is specified in the Value field well – in this case, 16 million. A Gauge configured so frugally has little purpose and you should, as a minimum, ensure that the Maximum value and Target value field wells are also set, as demonstrated below:

A nice little feature of Gauges is the ability to specify any of the potential field well values manually, within the Formatting options (discussed in the next section).  The Value field well must be populated already within your Gauge to support this feature. You will then have the ability to manually specify the other values within the Gauge axis options area:

Any manually defined figure will be automatically overwritten and deleted if you choose to use a field from a table instead, so take care here to avoid any data loss.

Gauges address a similar need to KPI’s, in that they allow you to view possible progress against a maximum or target value. A significant downside in using them is that they present a less visual means of showcasing potential issues with your data. You should weigh these advantages/disadvantages up when determining whether to use a Gauge or a KPI as part of your report.

Visualization Format Settings

All Visualization’s within Power BI can be customised, often to the extent where they can look indistinguishable from when you first add them onto your report. The Formatting tab on the right-hand pane is your go-to destination in this regard, and is accessible by clicking the paintbrush icon while selecting any Visualization:

The types of things that are achievable via these options include, but are not limited to:

  • Modifying all aspects of the visualizations Title, such as its visibility, the text displayed, font colour/size/type and alignment.
  • Adding a colour background to the visualization.
  • Including a description for the visualization.
  • Toggling a border for the visualization and its colour.
  • Fine-tuning the exact location of the visualization on the report, based on its X & Y Position values.

Each Visualization will also have a set of specific, unique options. We can see an example of how this looks by going back to KPI’s again and examining the top four options listed:

  • Indicator: This area provides options on how to display the Indicator field value on the KPI. It is possible to round up figures to the thousands, millions and even trillions, and also to adjust the number of decimal places shown. Auto is the default option used and will generally assign the best rounding option, depending on the underlying value.
  • Trend Axis: Here, it is possible to enable/disable the trend visual on the KPI. The example below demonstrates how this looks when disabled:
  • Goals: With the Goal toggle, it is possible to remove the Goal figure underneath the Indicator value completely; the Distance toggle will remove the percentage distance value as well. It is possible to mix and match options here, as indicated in the example below:
  • Color coding: The default RAG (Red, Amber, Green) traffic light system should be suitable for most situations but, if you have a specific branding requirement, it is possible to override the Good, Neutral and Bad colours with a custom Hex colour value. The Direction option also lets you reverse how the KPI works. So, for example, if raising more than 5 IT service requests would lead to a Bad outcome, any number underneath this would appear as Good instead.

When it comes to this subject area for the exam, there is no need to study the whole range of formatting options available; however, a general awareness will hold you in good stead.

Example: Creating a KPI

The process involved in building out a KPI can be a lot more involved then you may suspect, based on the descriptions provided so far. Therefore, the example that follows is designed to show you the type of preparatory modelling steps that will be needed to put in place a working solution utilising KPIs. To follow through these steps, make sure you have connected Power BI up to the WideWorldImporters sample database and that the Sales.OrderLines table is within your Power BI data model:

  1. In Power BI Desktop, on the Sales OrderLines table, use the New Column button to add on the following new calculated columns:
    • GrossPrice = ‘Sales OrderLines'[UnitPrice] * ‘Sales OrderLines'[Quantity]
    • NetPrice = ‘Sales OrderLines'[GrossPrice] + (‘Sales OrderLines'[GrossPrice] * (‘Sales OrderLines'[TaxRate] / 100))
    • OrderDate = RELATED(‘Sales Orders'[OrderDate])
  2. Next, create a Calculated Table via the New Table option, that uses the following DAX formula:
    • SalesOrderAgg2016 = FILTER(SUMMARIZE(‘Sales OrderLines’,’Sales OrderLines'[OrderDate], “Total Gross Price”, SUM(‘Sales OrderLines'[GrossPrice]), “Total Net Price”, SUM(‘Sales OrderLines'[NetPrice])), ‘Sales OrderLines'[OrderDate] >= DATE(2016, 1, 1) && ‘Sales OrderLines'[OrderDate] <= DATE(2016, 12, 31))
  3. Doing this will create a new table object that looks similar to the below, providing a total sum of the calculated columns created in step 1), grouped by OrderDate. I would also recommend, at this stage, to change the format of the new columns to your preferred Currency value:
  4. Add a new Calculated Column to the SalesOrderAgg2016 table to get the Month Name label from the OrderDate column:
    • OrderDateMonthName = FORMAT(DATEVALUE(SalesOrderAgg2016[OrderDate]), “MMMM”)
  5. With the base data ready, we can now look at creating an Actual and Target Measure on the SalesOrderAgg2016 table, using the following DAX formulas:
    • Actual Total Net Price = SUM(SalesOrderAgg[Total Net Price])
    • Target Total Net Price = 5750000
    • Actual Total Gross Price = SUM(SalesOrderAgg[Total Gross Price])
    • Target Total Gross Price = 5500000
  6. On the Report tab, under the Visualizations area, click on the KPI icon to add an empty KPI visualization to the report:
  7. Click on the newly created Visualization and, under the Fields area, drag and drop the appropriate SalesOrderAgg2016 fields into the wells indicated below:
  8. The visualization will then update accordingly, showing us the figure trend over each month and coloured red to indicate that this KPI is currently off target:
  9. To see how a KPI looks when ahead of target, we can repeat steps 5) and 6), but this time using the Net figures instead:

Key Takeaways

  • There are two principle visualization types available within Power BI to help track actual-to-target progress – KPIs and Gauges.
  • KPIs provide a more visually unique means of a binary success/fail determination when tracking towards a target. It is also possible to use KPI’s to track variance over time via the Trend axis. The Indicator will typically be the result of some form of aggregation or Measure.
  • Gauges provide a less visually distinctive, but non-binary, mechanism of viewing progress towards a target. Gauges support more potential field well values when compared with KPIs, nearly all of which are optional in some way. You can also manually define some of these values, for situations where your data model does not contain the required information.
  • All visualizations within Power BI are modifiable from a display or formatting perspective. The same basic options will generally be supported – such as changing a font type or background colour – with more specific configuration properties available per unique visualization type. For example, a KPI visualization can be customised to hide the background Trend Axis entirely. All of these options are designed to give developers greater control over the look and feel of their reports and to mirror them as closely as possible to any potential branding requirement.
  • When building out a solution designed to monitor progress within Power BI, the steps involved will typically be more in-depth than merely creating a new visualization. In most cases, there will be a requirement to bring together a lot of the other skills that have been discussed previously within this series – such as creating DAX formulas, modifying data within Power Query or bringing together different data sources into a single model. It is essential, therefore, not to underestimate the amount of time and effort involved in creating a practical solution that takes advantage of KPIs or Gauges.

I hope that this weeks post has been a little easier to bear when compared with DAX 🙂 . In next weeks post, we will take a closer look at data hierarchies and how to apply these to visualizations within Power BI.