Average one column based on another column's content
Greetings,
Apologies if this has been covered, I may not be wording it correctly to get the answer.
I have a spreadsheet that has several columns. I have one column named Altmetric Score, and another called National Research Program. The data looks like this:
National Research Program
Altmetric Score
ACE
99
CSS
25
SSWR
65
ACE
48
CSS
534
My bar chart looks like this:
What it's doing is averaging out ACE correctly, but then it's taking the average of SSWR, and adding it to ACE. Then it's taking that total, and adding it to CSS, ect. I tried using the aggregate function inside my avg function but to no avail. Below is my expression that gets this particular result: