Using Year-to-Date Calculations
When working with aggregated measures such as Year-to-Date calculations, it is necessary to incorporate additional logic into your value field; otherwise, the column will summarize the aggregated values at the total level.
For example, if you want the aggregated value of a Year-to-Date calculation, you would want to display the value for the last month, i.e., the maximum value in your month field. This means you want to see the sum of your value, filtered for the maximum value of your month field.
To achieve this, navigate to the Visual and click Edit. Select the value field you want to adjust. Click Edit Expression to add your logic using these following steps:
- Choose sum of and select your measure.
- When you hover over your expression, a filter symbol appears.
- Click on the filter symbol and select Add Filter.
- When altering your filter, choose the field you want to filter on and change is one of to is equal to.
- Click on the fx-symbol and select Maximum of and then choose your filter field again.
Given that the filter expression involves numerical calculations, the filter field should be of integer type.