Maximise Data Performance with Data Modelling in Power BI

Today, I’m talking with Martin, one of STL‘s outstanding Power BI trainers, about the importance of Data Modelling. I’m asking Martin how I can maximise my data’s performance with data modelling in Power BI.

Maximise Data Performance with Data Modelling in Power BI

Hi Martin, thanks for taking the time to have a chat with me. My Power BI Reports often take ages to update when new data is added at source. I need to structure my data so that it takes up less memory and updates more quickly. I have a few questions for you:

What is a Data Model and why is it so useful?

Martin: A Data Model, in simple terms, is a system of datasets or tables with specific fields in common with each other. These are connected using something called ‘Relationships’. It is these relationships that help bring the disparate tables together as though they were a single entity. So why have a data model if you could just have one single file that contains all the data? The reason is that this single file (or flat file) uses up more memory and slows down performance because data is needlessly duplicated across multiple rows. However, a data model reduces the amount of duplication and will, in practice, help you become more productive.

That doesn’t sound too hard. How does it work?

Martin: Let’s say you had Customer data relating to their contact and order details. In the table below is a ‘Customer’ table where Customer ID appears once. Each row contains a unique record of customer details.

The 2nd table below contains many orders for each customer, so the Customer ID appears many times e.g., Customer ID 1014.

When these two tables are imported into Power BI desktop from Excel, the common field which is ‘Customer ID’ is used to create a ‘1 to Many’ relationship. This means that, for example, you can create a report visual to show a breakdown of Customer orders by Region even though the Order and Customer fields are in separate tables.

Without creating a data model, what is the alternative?

Martin: The standard practice would be to:

  1. Use the VLOOKUP formula in Excel to ‘look up’ each Customer ID in the Orders table
  2. Find a match in the Customers table
  3. Then return the corresponding ‘Region’ as a separate column back in the Orders table (see below)
  4. Once all the data is in a single table, create a pivot table to summarise ‘Orders per Region

Note that ‘Northeast’ is duplicated 4 times. If each customer placed an average of 1000 orders and there were 100 customers, then the customers’ region would be repeated by a huge amount (100,000 times more). This inevitably slows down the performance and affects productivity. In contrast, the data model in Power BI Desktop would only refer to the ‘Regional data’ 100 times – once for each customer in the Customer table – and is therefore more efficient and quicker in processing the data.

Any final thoughts, Martin?

Martin: Using data models in your Power BI reports can dramatically reduce the amount of duplication and therefore help to maximise your data’s performance.

To learn more about Data Modelling and how to apply it to your data, STL runs a 2-day Power BI Modelling, Visualisation and Publishing course. Please click on the link below for the course outline:

https://www.stl-training.co.uk/syl/205/microsoft-business-intelligence-advanced-training-courses.html

To see how data modelling can be applied, please click the following article:

https://www.forbes.com/sites/anniebrown/2021/08/24/can-ai-data-modeling-prevent-climate-catastrophe/?sh=1cde32423baf

Thanks so much, Martin, for explaining how to maximise data performance with Data Modelling in Power BI. I will explore this some more and start creating my own data models from now on!

Power BI AI Visuals Part 4 – Smart Narrative

Microsoft has created some very interesting AI (Artificial Intelligence) visuals for Power BI. Power BI offers four AI visuals – Q&A, Key Influencers, Decomposition Tree, and Smart Narrative. This is Power BI AI Visuals Part 4 – Smart Narrative.

AI visuals are very useful. All four can provide your report with insight information from your data model. Without these, you need DAX measures to create your own visuals.

Power BI AI Visuals Part 4 – Smart Narrative

Smart Narrative

The Smart Narrative AI visual can explain your graphic by searching for key influencers in your data model.

In the example below, you can see a simple line chart. The data model in this example is from HR data and the line chart show salaries for all employees over 3 years from 2017 to 2019. To get insights from the smart narrative visual, it needs to be selected. In this example, select the line chart, then click Smart Narrative on the Insert tab in the AI Visuals group. Power BI will then find interesting statistics and create a text box with these statistics. In the simple example below, below the line chart you can see the result of this analysis.

A More Interesting Example

In the HR data model used here, we measured the employees’ productivity and engagement scores. In the example below, we need to explain the correlation between engagement and productivity on a Power BI page.

Below you can see the visual for all departments and the text box created by Smart Narrative.

Above, you can see a slicer to filter by department at the bottom of the page. The Smart Narrative text will change if you filter the chart visual.

Below, the page is filtered to only show data from the HR department. In the example above, there was close positive correlation between engagement score and productivity. However, you will see in the example below that the trend is different in the HR department. The engagement is still positively correlated by the productivity over all 3 years, but the last year is negatively correlated. You can also see that the Smart Narrative tool now only looks at insight data about the HR department.

Conclusion

Before Smart Narrative was available in Power BI desktop, we had to create text boxes with static text to explain the visuals. Smart Narrative not only explains the visual but also gives the audience insight which takes the in-depth analysis to provide a number of DAX measures. Furthermore, it is dynamic. When the trends change over time, the text will update. As you saw in the examples above, the narrative will also change when the visuals get filtered.

This concludes Power BI AI Visuals Part 4 – Smart Narrative. If you would like to find out about the other AI visuals in Power BI, please follow STL on LinkedIn or visit our website.

STL has two Power BI courses which include AI visuals. Power BI Reporting and Power BI Modelling, Visualisation and Publishing.