Example for windowCount

Would love to see a windowDistinctCount function as I would use this to determine monthly customer movements and need the previous month to achieve this. I noticed there is also another similar post asking how this can be achieved.

Can this be achieved using calculated fields?