Understand visual calculations
- preview feature as of sept 2024
- preview setting still avail at jan 2025
- home > calculation > new calculation
- require user write dax
- stored within the visual, not in measure/model
e.g.
- A comparison of sales over years.
- A running sum of cost by category.
- A moving average of profit over time.
Visual calculations combine
- straightforward context of calculated columns
- flexibility of on-demand calculations from measures.
They work on aggregated data instead of detailed data
visual calculation usually performs better than measure.
Create visual calculations
Although possible, there’s no need to add an aggregation function like SUM as you would in a measure.
- better not to add such aggregates when they’re not necessary.
- allows easier distinction between measures and visual calculation expressions.
- use template
- to the right of the dax formula textbox. click fx
avail dax funcs
- context limited within visual matrix
- hence no model relationship funcs like userelationship, related, relatetable
Use parameters in visual calculations
Use the Axis parameter
many func have optional axis param controling how it traverse the visual matrix
- row
- columns
- rows column
- columns row
Use the Reset parameter
- NONE is the default value and doesn’t reset the calculation.
- HIGHESTPARENT resets the calculation when the value of the highest parent on the axis changes.
- LOWESTPARENT resets the calculations when the value of the lowest parent on the axis changes.
- A numerical value which refers to the fields on the axis, with the highest field being one.
e.g.
RUNNINGSUM([Sales Amount], HIGHESTPARENT) starts from 0 for every year.
RUNNINGSUM([Sales Amount], LOWESTPARENT) starts from 0 for every Quarter.