You don't need to use this special calculation to get the yyyy-mm format unless you need to export this text somewhere. A custom date format can specify that format without needing to make it part of the calculation.
Let ( T = Get ( CurrentDate ) ; Date ( Month ( T ) - 1 ; 1 ; Year ( T ) ) )
will return the date for the first day of the preceding month, even when the current date is In January. You can either specify a custom data format to get YYYY-MM or you can plug the results of this into a calculation like you ahve in your post.
Thanks - will check this tonight!
Thanks again PhilModJunk. Worked perfectly - nice simple solution I was making overly complex. Learned about Let and Custom Date Formatting.