• Something like this would work:

    With units AS

    (

    Select Distinct

    unit

    FROM

    dbo.Full_Referrals_Dataset_live

    )

    SELECT

    count(FR.[Unit]) as Actual,

    U.unit,

    FR.[1st_of_month],

    FR.[last_of_month]

    FROM

    units as U LEFT JOIN

    dbo.Full_Referrals_Dataset_live as FR

    WHERE

    FR.RfR1 = '18 month project'

    GROUP BY

    U.unit,

    FR.[1st_of_month],

    FR.[last_of_month];