2 Replies Latest reply on Aug 13, 2016 2:11 PM by philmodjunk

    reporting on a survey response


      I have a calculation field named Faculty Whiteboard that specifies "Y" or "N" based on the answer to a survey question.


      Calculation is

      If (Surveys::_pk_SurveyID = 6 and Questions::Order = 1 and PatternCount(Response; "Attending Name") > 0; "Y" ; "N")



      One of the fields in the Respondents table is Faculty Name. I would like to create a report that lists the percentage of "Y" answers for each Faculty Name. I'm not sure the best way to approach this. (Not sure if I've supplied enough info here.)

        • 1. Re: reporting on a survey response
          Johan Hedman

          First off, I would do a Case() instead of a If(). That makes things easier to read


          Case (

          // If this is correct you do this

          Surveys::_pk_SurveyID = 6 and Questions::Order = 1 and PatternCount(Response; "Attending Name") > 0; "Y";

          // Otherwise you do that. You can comment so it becomes easier to understand





          For this problem you need another calculated field, say Faculty Whiteboard Number



          // If true

          Faculty Whiteboard = "Y"; 1;

          // Not true




          Then you do a Statistic field that use this new field and put that Statistic field in your report

          1 of 1 people found this helpful
          • 2. Re: reporting on a survey response

            I'm concerned about the colons that I see in your calculation.


            Surveys::_pk_SurveyID = 6 and Questions::Order


            are both fields from a related table (occurrence). The relationships between that and the table where you've defined this calculation plus the "context" you specify for it will all affect your results.


            And keep in mind that if there are many related records in Surveys and/or many related records in Questions, your calculation, as written, can only "see" data from the "first related record". In an unsorted relationship, the first related record happens to be the oldest related record. For sorted relationships, the first related record will be determined by the sort order.