Approach seems correct, but no idea what is wrong without seeing your data.
I know you have confidential data, but please read attached link and make data Anonymous.
We are sorry but we are always struggling with the situation of question without packaged workbook
thanks for the reminder
I started to create test data to publish and found that using test data / a smaller dataset I was able to understand why I was getting what I was getting.
fyi -I was counting number of rows but should have COUNTD Customers