I have two new measures:
BrandQTD = TOTALQTD(sum(Query1[Brand Units]),Query1[Date])
and the same formula for last year
BrandQTD_LY = CALCULATE([BrandQTD],SAMEPERIODLASTYEAR(Query1[Date]))
They work fine but when I use a slicer, the sameperiodlastyear formula gives an error.