I have a simple profit value that I'd like to calculate as YTD but only show the figures up to the current month.
i.e. With just YTD it looks like this:
But I'd like it to look like this:
I am currently using the following DAX formula to achieve this:
Profit YTD:=IF (
MAX ( 'Date'[Date_Key] ) <= TODAY (),
( TOTALYTD ( [Profit], 'Date'[Date_Key] ) ),
BLANK ()
)
This works great until I use the date hierarchy (Year-Quarter-Month) as then the data for the current year is not displayed:
I know why this happens, but I don't know how to resolve this in DAX. Any help greatly appreciated.