See the following QVW for reference.
I just transformed the date into numeral because it's easier to handle in set analysis.
So, if the user gets any date of the month for a specific year, lets say February 2nd, it will get the sum of count field for the year of 2017 and where the month is YTD based on selection.
In this case, it will sum up all the values for January and February 2017.
Left most table is the generated calendar, mid table is the excel data and right most table is the expression used to calculate with set analysis,