Forum Discussion
Microsoft Report builder YTD Calculation Error
Hi all,
Ive been struggling with an issue for a long time in Microsoft Report Builder and have not found anything that worked for my model. I have created a very simple dataset to replicate the problem I am having.
I have a powerbi dataset connected to Microsoft Report Builder through dax studio
My data model has 3 columns:
- Region
- Date
- Amount
I would like to display a YTD value
If i selected Jan 2023, the YTD measure returns the correct value
If i select Jan 2023 and Feb 2023, the YTD measure returns the correct value
If i select Jan 2023, Feb 2023 and March 2023, the measure returns the correct value
If i select Feb 2023 and March 2023, the measure returns incorrect value - It returns the sum of the periouds in the filter selected.
I need it to return the YTD for the max date in the filter selected
The dataset and report builder files can be found here
Any help would be greatly appreciated