If you want to measure the YTD sum of the SALES measure, there are two approaches.
YTD calculated filter
The most common practice is to create a YTD calculated filter to select only invoice date dimension values in the YTD range, then show the sum of the SALES measure. This works as long as those are the only sales values you want to display, since the filter calculation excludes any other records from the view.
But if you want to include other values outside of the YTD selection then you can’t use a dimension filter. What if you want to show the YTD sales AND the After YTD sales? If you use a dimension filter to select only the invoice date records in the YTD range, you won’t see any records beyond that selection.
YTD calculated measure
You can create a calculated sales measure to show the sales value only if the invoice date fits the YTD criteria. Another calculated sales measure can be used to show the sales values outside the YTD selection criteria. The data logic is built into the YTD sales measure calculation itself, not a dimension filter.