In you formula, your dates are not aggregated but the unique clicks are.
I suggest something like;
SUM(if datediff('month', [Publish Date],[Activity Date]) = 0 then [Unique Clicks] end)
SUM(if datediff('month', [Publish Date],[Activity Date]) = 0 then [Unique Views] end)
This way you apply the Date logic on every row and then you sum the rows returned by this logic.
note: the datediff with 'month' arg will give you the difference in month between 2 dates.
I found a more convoluted way to do it with three separate calculated fields... but I like your way much better Michel! Thanks!!