I have the following dataset that I would like to take the count and make buckets based on a 15 day period and the code and description. I have created a column that sums the count if the transactions are within a 15 day period and the code and description match. I need to display the data in a way that is suitable for further testing.
I was wondering if there was a way to do this calculation of the sum but instead change it so that if a value is already counted, it will not be counted twice or duplicated. That is, from the first occurence of the transaction in the 15 day period, the next transactions of the same type are not counted. As you see now it is more a running total of the current date + 15 days.
Here is an example of the expected output:

In summary, the goal is to take the sum of the column and have it be equal to that of the Count column. Attached is the input file.