Macy’s gave a lower sales and earnings forecast for the year as it said discretionary spending slowed in March.