Data Training from Zomalex

Home | Power BI | Excel | Python | SQL | Visualising Data | Generative AI

Power BI Modern Features - Course Notes

These notes are originally for the session on “What’s new in Power BI for the data analyst” at the Manchester M365 conference on September 28th 2024.

There have been so many improvements to Power BI that it would be futile to try whizz through them all in under one hour. Instead, this session focusses on three of the most important improvements:

This session omits two major improvements to Power BI

Improvements to Power BI visuals

There have been many improvements to Power BI visuals over the last year or so. These include:

In this session, there is quick demo of some of these improvements and a guided tutorial on the new card visual.

The New Card Visual

Microsoft telemetry shows that the card visual is the most popular visual used in Power BI reports.

The old card visual has one big disadvantage in that it can only show one number, without any context. The new card solves this by enabling us to have detail metrics that put the headline figure into context, for example

The new card visual has many more formatting options and many more dynamic capabilities (visual properties that can be set by a DAX calculation).

The Microsoft team building these has announced delivery in several phases

  1. (June 2023) multi-cards, layout features, dynamic formats
  2. (Nov 2023) reference labels
  3. actions
  4. trends
  5. small multiples

The new card will eventually replace three existing visuals: the old card, KPI and multi-card visuals.

This snapshot compares the old and new charts. The new chart has the reference labels to add context to the headline value (the callout value).

pbi-old-vs-new-card-comparison

The new card is really a collection of cards. The first card, titled Sales, has two reference labels (for 2022 and 2023). The reference label is made up of three parts; a title, value and detail component. Each of these parts has many dynamic properties. For example, the detail has a data property that is assigned to the [Sales Trend Direction] measure and a font colour property that is set to the [Sales Trend Colour] measure.

pbi-new-card-ref-label-detail-options

Visual Calculations

Visual calculations provide an easier way to write typical calculations, such as running totals, than DAX measures.

The new visual level format strings, under Properties | Data Formats, released Aug 2024, now can be applied to visual calculations – so now there is a way to format these properly!

viz-calcs-example-with visual-matrix

Visual Calculations - Specification

A visual calculation belongs to a single visual. It cannot be used from any other visual.

Visual Calculations are simple DAX calculations defined on a specific visual. They can refer to fields on the visual. They are executed in the scope of the visual.

When creating visual calculations, Power BI Desktop shows a visual matrix. This has the data in the visual arranged with rows / columns.

There is a standard template for typical calculations so no need to write any DAX - just point and click. These typical calculations include:

viz-calcs-template-functions

The performance is better then measures, since visual calculations run on aggregated data.

There are some new high level DAX visual functions:

These allow us to create time intelligence functions more simply than with measures. For example, a Year-To-Date function:
YTD Sales = RUNNINGSUM([Sales],ROWS,,HIGHESTPARENT)

viz-calcs-example-ytd

The importance of visual calcs

It is difficult to build good measures for even typical business calculations. This is true even for calculations like running totals that are easy in Excel. People have to understand how filter context and row context applies. These are hard concepts, requiring a lot of practice to master. Visual Calculations solve this problem. People can write these calculations with simple DAX or just point and click for many situations.

A few people suggest that visual calculations may have unintended consequences for Power BI good practices.

DAX Query View

When we have to write DAX measures, the new DAX query view provides a much more productive environment than the old “formula bar” approach. The DAX Query View is a proper script editor.

This section covers:

The design of the Query Editor has three touches of genius

  1. Quick queries: these avoid the “blank page” trap, helps learn DAX
  2. Update model: keep in the “zone”
  3. Run DAX query for visual: helps understand DAX and Power BI at adeeper level

The benefits are not immediately obvious but are profound (so stick with it until it become second nature)

Walkthrough

In interactive sessions this will be a live demo.

Here is a typical short query run in the DAX Query View.


We can use variables to make the DAX more readable. Notice the DEFINE VAR syntax.


The Performance Analyser Pane has a “Run in DAX query view” button to show and run the DAX that a visual, in this case the bar chart, uses to obtain its data.


Power BI visuals use the SUMMARIZECOLUMNS() function to return the data they need


Quick queries allows us to define all measures. The DAX query view generated the DAX. Note:


This is often a good starting point for creating new measures and adding them to the model. For example, we have extended this to create and test two new measures. Notice that:


Once updated, the new measures are now in the model.

Other recent improvements

There have been many other improvements over the last year or so. These include:

Reporting Improvements

DAX and Data Modelling Improvements