• Including the case statement for the "Actual Sales" column would ensure you get the sales for the first 5 months.
    Currently the "ActualSales" for the rest of the months is null for SaleMonth>5 so it doesnt matter


    select
    Store,
    sum(CASE WHEN SaleMonth <= 5 THEN PlannedSales END) as 'Planned Sales',
    sum(PlannedSalesYear) as 'Planned Sales Year',
    sum(CASE WHEN SaleMonth <= 5 THEN ActualSales END) as 'Actual Sales' /*Added the statement from Drews Solution*/
    from #Sales
    group by Store