It doesn't work
I don't need Start of month,I need to sum Quantities for current period Like for 2 weeks that has passed this year and to compare this to the Sum of the same period Last year. For Example today is 15th January and I want to sum quantities from 1-15 January in 2017 and 2018 and compare this data in the bar chart.
Looks like you are looking Each Day comparison.
the result of
will show you the Quantity until today because of no record exist for tomorrow.
i would Say
for last Year