I believe Tableau has this feature built in, and it should be a matter of clicks to get what you are looking for.
I recommend checking out the following KB:
Let me know if this is helpful.
COUNTD only counts how many distinct items are in a set. I need to know how many times a distinct ID appears within the set. In the link provided i would need to know that apple appears twice in east and use that number in a case or if statement
I used the Superstore data to simulate what you've described. Please see the attached workbook.
Filter on Order Date, choose Relative dates, and enter last 12 months. (I used 24 just to make sure we grabbed some data since the Superstore data is older.)
Create a calculated field for however you want to group your ID counts. Something like this (named 'Text' in the attached workbook):
IF sum([Number of Records]) < 10 then 'Small'
ELSEIF SUM([Number of Records]) <= 20 then 'Medium'
Then use the Number of Records measure to count the number of instances of each Order ID.
Is this what you were looking for? Hope it helps!
Superstore.twbx 677.4 KB