Good morning,
I'm trying to figure out how to obtain the sum of a set of records but I've been unable to do so. The solution proposed here worked perfectly but I've encountered an additional problem while trying to apply it to my dataset.
This is an example of the original dataset
The desired results would be
Basically
Thank you so much in advance for your help
I'm trying to figure out how to obtain the sum of a set of records but I've been unable to do so. The solution proposed here worked perfectly but I've encountered an additional problem while trying to apply it to my dataset.
This is an example of the original dataset
Type of product | Date | Count |
a | 202011 | 5 |
b | 202011 | 7 |
b | 202011 | 7 |
c | 202011 | 6 |
a | 202012 | 5 |
a | 202012 | 5 |
b | 202012 | 9 |
c | 202012 | 2 |
c | 202012 | 2 |
a | 202101 | 4 |
b | 202101 | 5 |
The desired results would be
CONDITION A | 5 + 5 + 4 = 14 |
CONDITION B | 7 + 9 + 5 = 21 |
CONDITION C | 6 + 2 = 8 |
Basically
- If the number in column C is repeated but the date in column B is the same it should only sum that number once
- If the number in column C is repeated and the date in column B is different from another instance where the number was the same it should be taken into consideration for the sum
Thank you so much in advance for your help