The problem
Your YTD measure returns the same value as the month, or the previous-year measure is blank.
The fix
Time-intelligence functions need a date table with one row per day, no gaps, related to the fact table and marked as a date table (Table tools › Mark as date table).
Revenue YTD = TOTALYTD ( [Revenue], 'Date'[Date] )
Revenue PY = CALCULATE ( [Revenue], SAMEPERIODLASTYEAR ( 'Date'[Date] ) )
Revenue YTD PY = CALCULATE ( [Revenue YTD], SAMEPERIODLASTYEAR ( 'Date'[Date] ) )
For a fiscal year ending in June, add the year-end date: TOTALYTD ( [Revenue], 'Date'[Date], "06-30" ).