BLOGS BY TOPIC
BLOGS BY AUTHOR
BLOGS BY YEAR
Although there aren't many changes this month, the ones that there are of unusually high quality. The new look to Power BI is welcome (even if it does mean we have to rewrite all of our courseware), and we're looking forward to using the new conditional formatting options and visual header tooltips.
- Changes introduced in the June 2019 Power BI update
- A new look-and-feel (sob!)
- More conditional formats / expression-bound formatting (this blog)
- It is now possible to filter slicers themselves
- Visual header tooltips
- Assorted other minor changes
- Features waiting in preview
Posted by Andy Brown on 14 June 2019
You need a minimum screen resolution of about 700 pixels width to see our blogs. This is because they contain diagrams and tables which would not be viewable easily on a mobile phone or small laptop. Please use a larger tablet, notebook or desktop computer, or change your screen resolution settings.
More conditional formats / expression-bound formatting
I suspect this will be a regular item in my monthly update blog for some time, as it becomes possible to make the format of more and more parts of a Power BI report dynamic.
What I'll do on this page is show in detail one example of conditional formatting, and then list all of the parts of a report which now support this feature.
Example of how to bring up conditional formatting
So I have a pie chart with a light grey background:
The background colour has been set to grey.
When setting the colour, there's no clue that anything more ambitious is possible:
Microsoft need to display an expression icon next to any property which can be dynamic!
However, if you let your mouse linger over the property, a hint appears that there's more to it than meets the eye:
When you linger over the property, three dots appear on the right.
You can either click on these three dots or right-click on the property to show the conditional formatting option:
Setting conditional formatting
To use conditional formatting effectively you often have to understand how to create measures in DAX, but here's a simple example which doesn't use measures. Suppose that you want the background colour of your pie chart to depend on which environment you choose in a slicer:
Here I've gone for Water, which gives a blue background.
It helps that I've got an additional Colour column in the underlying table for the slicer:
I've assigned a different standard colour name to each environment.
To achieve this you could set the background colour of the visual to be the value of this Colour column:
Here we're colouring based on the value of a field.
So what can you conditionally format?
I think I prefer the term expression-bound formatting, but hey ho ... here are the new places you can apply conditional formatting. Let's start with visual background colours, which we've just seen:
This is as above (where a conditional format has been applied, Power BI shows a function symbol to warn you of this).
Then there are the font and background colour of titles:
|Title font colour ...||... and background colour|
For a card visual, the category label colour ...
I must admit I always turn off category labels for cards and add my own title instead!
... and also the data label colour for a card visual:
Staying with my theme, here the label is in blue, because I've chosen the Water environment.
Finally, you can conditionally format the fill colour for a gauge:
The gauge fill colour is blue here, as again I've chosen the Water environment.
I wonder what order Microsoft choose when applying conditional formatting to formatting properties? Alphabetical? Random? Ease of coding? Or perhaps there's a focus group deciding the order?