Hey @Julie Whitehurst, further to James' observation of the TimePeriod() function requiring a metric, I also noticed that the syntax of your formula above has incorrect syntax for your current month value.
The syntax requires 2 arguments: Metric and offset period. In your example, your last TimePeriod() function call is structured with just the Metric portion (see James' comment above).
If I reproduce this incorrect syntax in my sandbox, I see the following error:
=TimePeriod(Cost) !ERR: Encountered " ")" ") "" at line 1, column 17.
Was expecting one of:
"," ...
<NUMBER> ...
<IDENTIFIER> ...

If your error is similar, then you'll know that's what it is complaining about.
James highlights that you don't technically need the TimePeriod() function in your logic if you just call the metric as is. So that is another way to get around. But if you want to be consistent for readability, the proper way to format the function would be "TimePeriod([metric], 0)".
Edit - fixing typo