Power BI Update August 2024

CSL, August 2024

Last month MS added the ability to customize reference layers in Azure Maps visual, made DAX query view available in live connect and updated Power BI enhanced report format (PBIR). This month, MS have updated visual level reporting format strings.

Reporting

Visual level format strings (preview)

Visual level format strings are here, providing you with more options to configure formatting. Originally built for visual calculations, the core ability that visual-level format strings provide is the ability to format visual calculations. Since visual calculations are not in the model, you could not format them, unless you were using them in data labels or in specific parts of the new card and new slicer visuals. With visual level format strings, you can!

The visual calculations edit mode showing the DiffPreviousPercent calculation that returns a percentage which is formatted as a percentage using the data format options in the format pane.

Visual level format strings, however, are useful even without using visual calculations.

With the introduction of visual-level format strings, Power BI now has three levels for format strings:

  • Model. You can set a format string for columns and measures in the model. Anywhere you use that column or measure the format string will be applied, unless it’s overridden by a visual or element level format string.
  • Visual. This is what we’re introducing today. You can set format strings on any column, measure or visual calculation that is on your visual, even if they already had a format string. In that case the model level format string will be overridden, and the visual level format string is used.
  • Element. You can set a format string for data labels and for specific elements of the new card and the new slicer visuals. This level will be expanded to include much more in the future. Any format string you set here will override the format string set on the visual and model level.

These levels are hierarchical, with the model level being the lowest level and the element level the highest. A format string defined on a column, measure or visual calculation on a higher-level override what was defined on a lower level.

Since visual calculations are not in the model, they cannot have a format string set on the model level but can on the visual or element level. Measures and columns can have format strings on all three levels:

LevelImpactsAvailable for
Measures, columnsVisual calculations
ELEMENTSelected element of the selected visualXX
VisualSelected visualXX
ModelAll visuals, all pages, all reports on the same modelX 

The image below summarizes this and shows that higher level format strings override lower-level format strings:

A diagram of a model and a element Description automatically generated

Let’s look at an example using a measure.

I have a Profit measure in my model, which is set to a decimal number format. To do this, you might have set the formatting for this measure using the ribbon:

the formatting options in the ribbon allow you formatting for measures and fields.

Alternatively, you could have made the same selections in the properties pane for the measure in the model view or entered the following custom formatting code:

Formatting options in the properties pane showing #,#.## to format the Total measure as a decimal number in the model.

If you put this measure on a visual it now returns a decimal number, as expected:

A table visual showing the Total measure formatted as a decimal number.

However, on a particular visual you want that measure to be formatted as a whole number. You can now do that by setting the format code on the visual level by opening the format pane for that visual and the Data format options found there under General:

You can set a visual level format string by selecting the visual and opening the format pane. There, go General / Properties and then Data Format. Finally, open Format Options and enter the format string.

Now that same measure shows as a whole number, but just on that visual:

A table visual showing the Total measure formatted as a whole number.

On top of that, you might want to use a scientific notation for that measure but only in the data label on a particular visual. No problem, you set the format code on the data label for that measure:

You can set an element level format string by leveraging the settings in the format pane. For example, set the display units for Data label values to Custom and enter a format code.

So now the total shows in scientific notation, but only in the data label and not in other places (such as the tooltip as shown below). Notice how the element level format is used in the data label but the visual or model level format string is still used for the other elements in the same visual.

A bar chart showing the Total measure by class. It also shows that the Total measure was formatted in scientific notation in the data labels, but not in the tooltip (in which it's formatted as a decimal number).

For visual calculations the same principle applies but of course without the model level. For example, if you have a visual calculation that returns a percentage, you can now format it as such using the Data Format options in the General on the visual in the format pane:

The visual calculations edit mode showing the DiffPreviousPercent calculation that returns a percentage which is formatted as a percentage using the data format options in the format pane.

The ability to set visual level format strings makes it much easier to get the exact formatting you need for your visualizations. However, this is only the first iteration of the visual level format strings. We are planning to add the settings you’re used to for the model level format strings to the visual level soon.

Since visual level format strings are introduced as part of the visual calculations preview, you will need to turn on the visual calculations preview to use them. To do that, go to Options and Settings > Options > Preview features. Select Visual calculations and select OK. Visual calculations and visual level format strings are enabled after Power BI Desktop is restarted.

 

This month, MS has announced several more improvements to reference layers: CSV support, new customization options, and dynamic URL sources!

First, the Azure Maps visual now supports CSV files as data sources for reference layers! Just as you can already use GeoJSON, Shapefiles, WKT, and KML files, you can now upload a CSV file instead in the reference layer section of the formatting pane.

You can also now format reference layer shapes from within the formatting pane. Previously, Azure Maps required you to define the color and width of points, lines, and polygons from within your reference layer files. Otherwise, these shapes would be drawn on your maps with the default colors and formatting. This requirement brought additional complexity to working with your reference layers in Power BI, since the files needed more than just the data you intended to visualize. Now, MS have added these standard formatting settings to each type of object in your reference layers in the formatting pane, so you can customize them directly from within Power BI!

Lastly, for those of you who need your reference layers to change with time or other data-bound conditions, you can now provide a dynamic URL using conditional formatting! This allows you to set custom logic to determine the reference layer URL the Azure Maps visual will use. For example, you can load in different reference layers based on the categories selected by a slicer, like to visualize performance of different product lines over the same geography.

Modeling

DAX query view in the web

Write DAX queries on your published semantic models with DAX query view in the web. DAX query view, already available in Power BI Desktop, is now also available when you are in the workspace.

Look for Write DAX queries on your published semantic model.

  1. Right-click on the semantic model and choose Write DAX queries.
  2. Click on the semantic model to open the details page, then click Write DAX queries at the top of the page.

This will launch DAX query view in the web, where you can write DAX queries, use quick queries to have DAX queries written for you on tables, columns, or measures, or use Fabric Copilot to not only write DAX queries but explain DAX queries, functions, or topics. DAX queries work on semantic models in import, DirectQuery, and Direct Lake storage mode.

Write permission, that is permission to make changes to the semantic model, is currently needed to write DAX queries in the web. And, the workspace setting, User can edit data models in the Power BI service (preview), needs to be enabled.

DAX query view in the web includes DAX query view’s way to author measures. Define measures with references, edit any of them, and try out changes across multiple measures by running the DAX query, then update the model with all the changes in a single click of a button. DAX query view in web brings this functionality for the first time to semantic models in Direct Lake mode!

If you do not have write permission, you can still live connect to the semantic model in Power BI Desktop and run DAX queries there.

Try out DAX query view in web today and learn more about how DAX queries can help you in Power BI and Fabric.

To learn more about Power BI updates in August 2024, view the full MS summary.

If you would like support in your Power BI projects, get in touch with CSL by emailing info@csl-uk.com.

Twitter
LinkedIn