Thanks so much for the reply @cbatrody but if then I want to count the unique customers for the 5/08/2014, for department 3 then this wouldn't work for me.

Any ideas?

Appreciate the help!!