4 Replies Latest reply on Jun 6, 2017 12:42 AM by NILOUFER MATHEW

    Filtering on 2 sets


      I'm working on a survey and created a set "Question Set1" that groups a set of 5 related questions(likert scale 1-5). I also have another survey question "What is your gender?" (1-Male, 2-Female). I want to filter "Question Set1" by Male respondents or Female respondents. ( Unfortunately Gender is a question on the survey and not part of the Question metadata).

      Any suggestions on how to go about this would be much appreciated!:)


      Can attach code if required.

        • 1. Re: Filtering on 2 sets
          Jonathan Drummey

          I'm assuming here that each answer for a respondent is a different row in your data, if not then can you share a sample of your data?


          The fastest to build is to use a FIXED level of detail expression to turn the record level results into a respondent-level dimension that you can use in filters. Something like {FIXED [myRespondentID] : MIN(IF [Question] = 'What is your gender?' THEN [Answer] END)} should work.



          • 2. Re: Filtering on 2 sets



            Thanks so much for your response. Attached is my workbook to better help

            you understand my problem.

            Once I pivot my data then I have as many rows as I have questions (if 1

            have 10 questions then 10 rows for the same respondent).


            I think the biggest issue is that the gender question(Q11) is not tied to

            the respondent but is a survey question having a response 1 (Male) and 2





            Best Regards,




            On Mon, Jun 5, 2017 at 11:06 AM, Jonathan Drummey <

            • 3. Re: Filtering on 2 sets
              Jonathan Drummey

              All records have a Participant ID, which I'm presuming be the respondent.


              Therefore {FIXED [Participant ID] : MIN(IF [Question] = 'Q11' THEN [Response] END)} will return the value of the Gender question to each Participant ID, and that field can be used as a dimension, like in this view:


              Screen Shot 2017-06-05 at 4.38.26 PM.png


              We can see that there are 4 values of the Gender answer in the data set - 1,2,3, and Null. You can right-click on them and choose Edit Alias... to turn them into human-readable values if you want.



              v10.0 workbook is attached, let me know if you have any questions!





              PS: You don't have to post the twb and tde separately, you can choose File->Export Packaged Workbook to generate a .twbx that will include both the twb and tde.

              • 4. Re: Filtering on 2 sets
                NILOUFER MATHEW

                Thanks so so much Jonathan.You are a life-saver:)




                On Mon, Jun 5, 2017 at 4:41 PM, Jonathan Drummey <