Honestly I believe that you are trying it a little bit too complicated. YTD calculations are quite easy within the gui with set analysis expressions especially if you used a master-calendar with flags. Here you find everything what you need: How to use - Master-Calendar and Date-Values
Yes, principally you need for each metric an own flag (nesting of flags is possible but complicated) which later led ideally to gui-expression like: sum(value) * YTDFlag or sum(value) * R12Flag and so on. If it worked in tables it will also work in charts but you might need to reduce the number of dimensions and expressions to get good results.
In the table, the YTD sales for a time period (e.g. Jan'15) will show an aggregration of sums from Feb'14 to Jan'15. This is perfect.
However, when I apply it in a chart which shows the YTD data (e.g. Nov'15 to Oct'15), only the cumulative sum is shown. (i.e. Nov'15 will only show Nov'15 Sales while Dec'15 will show Nov'15 + Dec'15 sales)
Unfortunately I can't look into your qvf but both objects haven't the same expressions. The table-expression isn't a cumulative expression it's a TOTAL. Your chart instead seems to have a cumulation.
I suggest you take another look into my suggestion from above - How to use - Master-Calendar and Date-Values - the examples are related to qlikview but you will find similar ones for sense and logic and script-syntax are for both the same.