How to create a custom count function for multiple fields of data

K Dinsmore
K Dinsmore used Ask the Experts™
Hello Experts!

We need to produce reporting on score aggregates, per submitter and large group. We are downloading a file of submitted scores. There is one line per submitter. Each submitter submits scores (scores of 0 through 4) on 5 to 6 criterion for 10 items. We need to consolidate the scores to a count per criterion per submitter. So, going from:

Item 1 Criterion 1 score      Item 1 Criterion 2 Score      Item 2 Criterion 1 Score      Item 2 Criterion 2 Score
1                                                                  2                                               1                                             3

To (note: values are counts not sums/averages/etc...)

Criterion 1 Score 1      Criterion 1 Score 2      Criterion 1 Score 3
2                                                   1                                                1

We also need to split the file by categories (see attached image). We were trying to use Excel 2016 Get and Transform to take the original data file and A) split the original file into three category files (successful); B) create the aggregate score count columns (criterion 1 score 1, etc.) (not successful). We can do the score counting in a regular worksheet using COUNTIF, and we could then transform again to remove the individual item columns, but we had hoped there would be a way to do it in the transform however none of the transform functions seem to be the right thing.

Ultimately, an image of the output is attached. Please and thank you!
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Rob HensonFinance Analyst

An actual file would be better rather than just an image. Can you upload one with dummy data?

I am thinking you might be able to use a Pivot Table to consolidate the data and then chart it.
K DinsmoreInformation Architect, Analyst and Visualization Consultant


Attached is a sample of how the data comes to me. Out of all the assignment submissions (30 in the sample data; 3 instructors submitting, 10 assignments each) we need to be able to count how many assignments scored 0, 1, 2, 3, or 4 for Interpretation, and the same for Representation, Calculations, Application/Analysis, and Communication. I can accomplish the counting with 25 COUNTIF columns, but I am hoping for a better way.
Thank you for the help!
See attached.
The formulas in column C count Category in column A for each Score number in column B, and divide with number of scores in the category, excluding empty fields.
In column D the score counts are divided with the total number of fields in the category.
Ensure you’re charging the right price for your IT

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden using our free interactive tool and use it to determine the right price for your IT services. Start calculating Now!

K DinsmoreInformation Architect, Analyst and Visualization Consultant


Hi Ejgil,
This is a great start but I have a couple of questions. Is it possible to make it responsive to filtering in the main table? Or is it possible to use this formula or a similar one to build a new table of the aggregate scores by submission that I could then pivot and filter for the various reporting needs? I will need to report scores at different levels of aggregation (all scores, scores from particular departments) as well as scores over time (once we have multiple years reported).  
Thank you for your help!
It will be very difficult, perhaps not possible, to calculate on filtered data.
A pivot table can show the same, a pivot table can be filtered, and a pivot chart will show the filtered result.

But a pivot table need the data arranged in rows.
I have made a macro to do that, so you must accept macros when the file is opened.
The button "Update" on sheet Pivot read the data on sheet "MATH Rubric", make the list on sheet "Table List", and use that list to update the pivot table data.
K DinsmoreInformation Architect, Analyst and Visualization Consultant


Thank you for the help with this problem! This will make this project much easier and I hope to be able to apply the solution to other projects as well.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial