Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Group Selection Formula

Status
Not open for further replies.

Oglesbay

Instructor
May 5, 2006
71
US
I was able to get assistance with my previous group selection formula and it worked wonderfully. The problem is that they changed how the data is stored and now it is in text where it was numbers in the past. Let me give you an example of my data.

We are trying to find the "Perfect Days" in our evaluations. The way we do that is if everyone in our class gives us a perfect score of "Strongly Agree" and there are 4 or more people in a class. An example of our data is this:

Jack Black 4/10/2010 "Q1" Strongly Agree
Jack Black 4/10/2010 "Q2" Agree
Jack Black 4/10/2010 "Q3" Strongly Agree
Mary Beth 4/10/2010 "Q1" Neutral
Mary Beth 4/10/2010 "Q2" Agree
Mary Beth 4/10/2010 "Q3" Strongly Agree
.
.
.

There are 12 questions in all for each evaluation but I only want the first 9 because the last three are open-ended comment questions and will never equal "Strongly Agree." So does anyone have an idea how to do a group select that will look through the first 9 of 12 questions and let through only those that all have "Strongly Agree" and there are more than 3 students in a class? Thanks!
 
I guess you'd group by class and then by question. Then create a formula {@stragree}:

if {table.answer} = "Strongly Agree" then 1

Then go to report->selection formula->GROUP and enter:

sum({@stragree},{table.question}) >= 4

This assumes that your records aren't duplicating because of table joins, i.e., that there is only one record per person per question.

-LB
 
LB - The formula didn't quite work. It looks like it did sum up all of the 1's and only returned the classes that had 4 or higher responses, but the responses that came back still had some Agree, Neutral and Disagree in the responses.

I think we're on the right track but I need to only return classes where ALL the responses are only "Strongly Agree". Any ideas? Thanks.

Chad
 
maybe...create a formula {@notstragree}:

if {table.answer} <> "Strongly Agree" then 1

You could then create a sum on the new formula possibly group on it as well.

sum({@stragree},{table.question}) >= 4 and
sum({@notstragree},{table.question}) = 0

I am mentally slowing down today but do think that you could combine this with lbass' solution and get the ones that have 4 or more Strongly Agrees and no other responses.
 
Well, while I was hoping you guys could help me out I thought I came across the answer. What I ended up doing was doing a group select formula as follows:

Sum({@stronglyagree},{table.question} =
Count({table.name,{table.question}) and
Count({table.name,{table.question}) >=4

This formula worked....sort of. What it ended up doing was only showing the questions that all answered "Strongly Agree". For example, on one response even though there are 9 questions, 2 of them everyone answered "Strongly Agree" so it concidered that class to be a perfect class.

Any idea on where to go with this to fix it?
 
I'm not following what is wrong with the solution you posted in your last thread. So maybe you need to clarify further why this isn't correct.

-LB
 
Ok, I'll try to explain it again. A "perfect day" is when we get all Strongly Agree on ALL questions. The forumula above simply returns only the questions that all have Strongly Agree. For example, one class returned only two of the nine questions because in those two questions all of the respondents answered Strongly Agree. The problem with that is that with the details hidden it looks like that is a perfect day and therefore giving us a wrong answer.
 
lbass -

You are right that there is nothing wrong with the formula, we just drilled down one group too many. By grouping by question that is what brought our error. If I removed that group and put the formula on the class, it worked perfectly. Thank you all for all your assistance with this issue!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top