Become a Dynamics 365 expert with Syvantis Learn
Provide additional details about the offer you're running.
This store requires javascript to be enabled for some features to work correctly.
Provide additional details about the offer you're running.
How to use visual calculations in Power BI
Power BI & Fabric • Power Platform
Visual calculations is a new preview feature in Power BI that helps users create complex calculations directly within a visual, reducing the need for lengthy DAX measures. In this Fast Class, Simon Engstler explains how visual calculations work, demonstrates common use cases such as average price calculations, running sums, and moving averages, and reviews the feature’s benefits, limitations, and best practices for building more intuitive Power BI reports.
Visual calculations are a preview feature in Power BI designed to simplify measure creation directly within a visual. Rather than building complex DAX measures that must account for multiple contexts and scenarios, users can create calculations that operate specifically within the selected visual. This approach makes it much easier to develop calculations such as:
Visual calculations also include built-in templates that help users create common calculations quickly, making the feature particularly useful for users who are newer to DAX.
Creating a simple visual calculation
To demonstrate the feature, Simon begins with a matrix visual containing Order Date, Order Quantity, and Sales Amount.
After selecting the visual and choosing New Visual Calculation, Power BI opens the Visual Calculations workspace. This workspace displays both the visual and a calculation area where users can create and test calculations. One example is an Average Item Price calculation created by dividing Sales Amount by Order Quantity. As calculations are built, Power BI highlights the fields being used and provides an intuitive editing experience that makes formula creation easier. Once committed, the calculation appears in the visual just like a traditional measure.
Understanding the first limitation
One important limitation is that visual calculations are tied directly to the visual where they are created. This means:
For one-time calculations this tradeoff may be acceptable, but reusable business metrics are generally better suited for traditional measures.
Understanding the second limitation
Visual calculations can only use data that already exists within the visual. For example, if a chart contains only a date field, Power BI will not allow a calculation to reference Sales Amount or Order Quantity unless those fields are also included in the visual. Fortunately, Power BI allows users to:
This approach keeps visuals clean while still providing access to the data required for calculations.
Using running sum templates
One of the most valuable aspects of visual calculations is the collection of built-in templates.
A running sum can be created by selecting the Running Sum template and specifying a single field, such as Sales Amount.
While running sums are not especially difficult to create in DAX, building versions that work correctly across multiple rows, columns, filters, and hierarchies can be time-consuming.
Visual calculations simplify this process because the visual itself handles much of the context management automatically.
How visual calculations differ from traditional measures
A powerful distinction is how calculations respond to visual changes.
In Simon’s example, a traditional running-sum measure is compared with a visual calculation running sum.
Initially, both return identical results. However, when the sorting order of the visual changes, the behavior becomes different:
Because visual calculations rely on visual context, they can feel more intuitive when users sort, filter, or reorganize data within a report.
Building moving averages
Another useful template is the Moving Average calculation. A moving average requires:
For example, a window size of seven will calculate a rolling average over the previous seven visible periods.
However, visual calculations operate at the level currently being displayed:
This may not always produce the desired result.
Adding more control with DAX
Although visual calculations provide templates, they are still written in DAX. This means users can apply familiar DAX techniques to customize behavior.
Simon demonstrates a custom Moving Average calculation using:
Examples include:
By combining visual calculations with DAX, users can create more sophisticated and flexible calculations while still benefiting from the visual-driven approach.
Additional visual calculation templates
Power BI includes several other templates designed to simplify reporting:
These templates use the visual’s hierarchy and structure automatically, reducing the need to hardcode complex logic into measures. Users can also write entirely custom DAX calculations when template functionality does not meet their requirements.
Current feature limitations
Because visual calculations are still a preview feature, support is not available across all visual types. Some visuals:
Users should review Microsoft’s current documentation to understand which visuals and calculation patterns are supported.
Key takeaways
Visual calculations offer a fast and intuitive way to create calculations directly within Power BI visuals.
Benefits include:
Limitations include:
For many reporting scenarios, visual calculations can significantly reduce development time while making advanced calculations more accessible to Power BI users.
* This transcript summary has been generated from the Fast Class video by Microsoft Copilot. The Fast Class itself was prepared and taught by Syvantis expert consultants.
TUNE INTO THE LIVE CLASS
Ask your questions and get real-time responses from your trusted Syvantis consultants.
What's on the schedule?
Dynamics 365 Business Central
Dynamics 365 Sales (CRM)
Dynamics 365 Customer Insights
Power Platform
Keep learning...
Business Process Designers. Technical Experts. Dedicated Partners.