Power BI UX Enhancements with Visual Calculations

Improving the user experience of Power BI visuals through conditional formatting, dynamic titles, and custom reference lines is now significantly easier, thanks to visual calculations. This article walks you through what they are, how they work, and why they can simplify your report development workflow.
Jun 25 / datatraining
What Are Visual Calculations?

In the past, we often had to create a long list of DAX measures just to format a single chart highlighting the max value, customizing axis limits, or updating titles dynamically. This cluttered the data model and added complexity.

Visual Calculations solve that by allowing you to write logic directly at the visual level, without adding measures to your model. They are flexible, contextual, and intuitive.

Use Case 1: Conditional Formatting (Highlighting Max/Min)

Let’s say you want to highlight the maximum value in a column chart.
1. Select the visual.
2. Go to the Build panel → Tooltips Add New Visual Calculation.
3. Name it: cf max
4. Use this expression:
The keyword ROWS() dynamically references the current dimension on the x-axis, no need to hardcode fields.

To apply conditional formatting:
Tweak the measure a bit:
Don’t forget to set the data format of the visual calculation to Text so that it can be used in the format pane.
Then go to Visual → Columns → Color fx → choose field value CF Max
The big advantage? The formula automatically adjusts even if you switch from Month to Product Subcategory on the x-axis.
Use Case 2: Dynamic Y-Axis Scaling

Sometimes, we want extra headroom in a chart by pushing the y-axis max a bit higher.

  1. Add another visual calculation: Yaxis max
  2. Use this expression:
To ensure this works at the total level (not just within a single context), wrap it in EXPANDALL:
Apply this to the Y-axis via the formatting pane.
Use Case 3: Highlight Points Above Moving Average

  1. Create a line chart
2. Add a moving average line from a template visual calculation.
3. Change its format to a dotted black line.
4. Create another visual calculation:
Apply markers only to this calculation (disable them for others). This highlights only the points above the moving average.
Use Case 4: Dynamic Subtitle Based on KPI

Let’s dynamically show how many months had sales above the 3-month moving average.

  1. Create a visual calculation returning 1 or 0:
  2. Wrap it in a SUMX(ROWS(), ...) to count total months.
  3. Wrap that again in EXPANDALL() so it works at the total level.
4. Create the subtitle:
Make sure to set this calculation to Text in the Properties panel.
Use Case 5: Reference Lines and Shaded Areas

You can also use visual calculations to dynamically set reference lines and shaded bands in charts.

  1. Create min and max of the moving average using visual calculations.
2. Use these values in the constant line or shaded area options.
3. Apply color formatting to only the top area.
Why Visual Calculations Are a Game-Changer

  • No need to pollute your data model with helper measures.
  • Works across dynamic axes (ROWS() and COLUMNS()).
  • Simpler syntax than traditional DAX measures.
  • Easier to maintain and reuse.

Summary

Visual Calculations allow you to:
  • Apply conditional formatting
  • Set dynamic axis limits
  • Highlight specific points
  • Build dynamic titles and subtitles
  • Customize reference lines and areas

All without writing cluttered DAX measures or modifying your data model.

Hope you like it!

Give it a try and see how it works for you! I’d love to hear what you think or see how you use this trick in your own reports.

How to Power BI

Watch it here

Launch Power BI Reports
that bring your organization
to a fully 
data-driven world.

Power BI Launch

After years of consulting we have developed a holistic solution for launching Power BI Reports in 3 months. From key metrics discovery, to report design, implementation and stakeholders' training. We know precisely how to launch Power BI reports that drive organizations' growth.

Power BI Trainings

Our technical trainings for report developers instantly upskill your teams. Alongside our unique business user trainings the improvement in overall organizational data literacy becomes immediately actionable.

Take your Skills to the Next Level

Power BI Trainings

__________