Let me just point out that I tested this myself and I can ensure that the error message appears even though the Target and Source line items are correctly formatted. As per the Anapedia documentation, this calculation should work with the settings from @litterbarbie ...
Re: TIMESUM cant aggregate(e.g. MAX) time period on time period dimension?
I had a similar issue a while back. I contacted support thinking that this is a bug and we came to the conclusion, that it might be linked to the MAX function, where a number or a data format is required. At least that was consistent when I was trying to get a result out of TIMESUM using MAX.
But this of course doesn't match what @rob_marshall said that in his testing it indeed is a bug.
Would be quite interested what is the real reason.