Count all the Yes, No, N/A for scoring

Qwaser
New Member

Hi all, fairly new to AppSheet.
Trying to create an inspection checklist with 100 questions. Each question will have Yes/No/N/A, using enum value type.

What I am trying to do is add one point to the total score if the value selected is Yes. (I will divide the point by the total number of questions to get the average)
If they select N/A, then that question will not count towards the total score. (total # of question will get minus by how many N/As)

I have been using 100 IFS statement in a virtual column to calculate the score.
Like so:
IFS([q6] = โ€œYesโ€ ,1) +
IFS([q7] = โ€œYesโ€ ,1) +
IFS([q8] = โ€œYesโ€ ,1) +
IFS([q9] = โ€œYesโ€ ,1) +
IFS([q10] = โ€œYesโ€ ,1) +
IFS([q11] = โ€œYesโ€ ,1) +
I am just abbreviating the question with q6, q7, q8, but in reality the question is long.

Then using another 100 IFS to count the N/A
IFS([q6] = โ€œN/Aโ€ ,1) +
IFS([q7] = โ€œN/Aโ€ ,1) +
โ€ฆ

My app sometimes wouldnโ€™t load, because there are too many IFS statements in one virtual column. Everytime I try to edit the questions, it is also a pain.

Just want to know if there is a simpler solution for this.

Thanks in advance,

Solved Solved
0 5 1,509
1 ACCEPTED SOLUTION

Steve
Platinum 4
Platinum 4

The way youโ€™re currently doing itโ€“with huge IFS() expressionsโ€“is the only way to do it if all of the responses are contained in a single row, as it appears they are. @Bahbusโ€™ suggestion would work if you structure your responses across multiple rows.

View solution in original post

5 REPLIES 5

Bahbus
New Member

COUNT(FILTER(โ€œQuestionsTableโ€, [AnswerColumn]=โ€œYesโ€))

Steve
Platinum 4
Platinum 4

The way youโ€™re currently doing itโ€“with huge IFS() expressionsโ€“is the only way to do it if all of the responses are contained in a single row, as it appears they are. @Bahbusโ€™ suggestion would work if you structure your responses across multiple rows.

Thank You, I guess I will have to do it the hard way.

One question, is there a limit as to how many IFS expression can be in a virtual column, because the app wonโ€™t load if i go over 100 IFS expression, I have to separate into 2 or more VC.

I donโ€™t know.

Coming back to this, if you are hell bent on doing this the hard way, then I would create a series of VCs to handle small chunks at a time. For example, if the form is 100 questions long, I would separate the form into multiple pages - lets say 10 pages, 10 questions each. I would then do a VC for each group of 10. Then you should be able to easily sum the 10 VCs together. If nothing else, this should make it slightly easier to manage in the long run.

Top Labels in this Space