You should be able to solve this with the Aggr() function. It appears that essentially you are trying to aggregate the DAY grained measure up to your YM level.
It would be something like: Aggr(Sum(Qtty), YM)
Sorry I don't have access to download your file and test it out in your context but hopefully I've put you on the right track.