# Ranking importance of a previous question's answers (multiple answers)

**URL:** <https://forum.getodk.org/t/ranking-importance-of-a-previous-questions-answers-multiple-answers/37960>\
**Category:** Support\
**Created:** [June 11, 2022, 12:52pm UTC](https://forum.getodk.org/t/ranking-importance-of-a-previous-questions-answers-multiple-answers/37960 "2022-06-11T12:52:40Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![ODK\_Ekomer](https://getodk.b-cdn.net/user_avatar/forum.getodk.org/odk_ekomer/32/18125_2.png) [@ODK\_Ekomer](https://forum.getodk.org/u/ODK_Ekomer)\
**Post date:** [June 11, 2022, 12:52pm UTC](https://forum.getodk.org/t/ranking-importance-of-a-previous-questions-answers-multiple-answers/37960/1 "2022-06-11T12:52:40Z")

</div>

Hello!

There's a question in our survey where we ask participants "From the following list of buyers, to which ones do you sell conventional agricultural products?"

Then, follow up with a question asking them "Of the buyers you mentioned, which ones are the most important?"

How can I do that? To be able to select (one or multiple) of the choices selected in the previous question. (Right now I just have the same list re-appear, not only the buyers selected)

I created a document with this question only in case it is easier to show me in it directly, and here is a screenshot of the two questions:

 ![image](https://getodk.b-cdn.net/uploads/default/original/3X/0/7/07ffec2b4a8ba7497302bd732bf6b27159e5baff.png)

And the choices tab:  
 ![image](https://getodk.b-cdn.net/uploads/default/original/3X/2/e/2e38ef622bee151373b9ef4b8b8ce32151f1183d.png)

Here's the excel sheet:  
[Buyers.xlsx](https://forum.getodk.org/uploads/short-url/5H8EKygG70Uc17D5BUB4Kpv4PSQ.xlsx) (9.2 KB)

Thank you very much! I appreciate your help.

Bana

---

<div class="post-metadata">

**Author:** ![danbjoseph](https://getodk.b-cdn.net/user_avatar/forum.getodk.org/danbjoseph/32/21901_2.png) [@danbjoseph](https://forum.getodk.org/u/danbjoseph)\
**Post date:** [June 11, 2022, 3:42pm UTC](https://forum.getodk.org/t/ranking-importance-of-a-previous-questions-answers-multiple-answers/37960/2 "2022-06-11T15:42:13Z")

</div>

If you're using the same list, and want the second question to only show options that were selected in the first question you can use add a `choice_filter` column with a value of `selected(${buyers},name)` for the second question. More details in this forum thread about [Choice filter with multiple selection](https://forum.getodk.org/t/choice-filter-with-multiple-selection/16714).

 ![Screen Shot 2022-06-11 at 11.36.55 AM](https://getodk.b-cdn.net/uploads/default/original/3X/d/b/dbfa7a7998948f16ce71a488aa65226edb91cf47.png)

Note, that there is a rank widget that might be useful for your survey (details in the [ODK docs](https://docs.getodk.org/form-question-types/#rank-widget) and [XLSForm docs](https://xlsform.org/en/#rank)).

---

<div class="post-metadata">

**Author:** ![ODK\_Ekomer](https://getodk.b-cdn.net/user_avatar/forum.getodk.org/odk_ekomer/32/18125_2.png) [@ODK\_Ekomer](https://forum.getodk.org/u/ODK_Ekomer)\
**Post date:** [June 11, 2022, 5:30pm UTC](https://forum.getodk.org/t/ranking-importance-of-a-previous-questions-answers-multiple-answers/37960/3 "2022-06-11T17:30:56Z")

</div>

Thank you so much @danbjoseph. Very helpful as usual!

---

<div class="post-metadata">

**Author:** ![ODK\_Ekomer](https://getodk.b-cdn.net/user_avatar/forum.getodk.org/odk_ekomer/32/18125_2.png) [@ODK\_Ekomer](https://forum.getodk.org/u/ODK_Ekomer)\
**Post date:** [June 13, 2022, 7:52pm UTC](https://forum.getodk.org/t/ranking-importance-of-a-previous-questions-answers-multiple-answers/37960/4 "2022-06-13T19:52:22Z")

</div>

Hello Dan,

I have a follow up question on this. The question right after "Of the buyers you mentioned, which ones are the most important?" is: "Of the most important buyers that you answered in the previous question, how satisfied are you with the sale with each buyer?" And the answer option is a "select\_one" from a list: "Very satisfied, satisfied, not satisfied, very unsatisfied"

I am attaching the file with the third question for your reference.

My question is: how do I have that 3rd question repeated but for only the choices selected in the previous question?

Thank you x 1 million! I really appreciate your help.

Bana

[Buyers.xlsx](https://forum.getodk.org/uploads/short-url/vON5hnr8H1ADzyZnzFRJRKj5G3n.xlsx) (9.6 KB)

---

<div class="post-metadata">

**Author:** ![danbjoseph](https://getodk.b-cdn.net/user_avatar/forum.getodk.org/danbjoseph/32/21901_2.png) [@danbjoseph](https://forum.getodk.org/u/danbjoseph)\
**Post date:** [June 13, 2022, 8:24pm UTC](https://forum.getodk.org/t/ranking-importance-of-a-previous-questions-answers-multiple-answers/37960/5 "2022-06-13T20:24:37Z")

</div>

Be sure to use an underscore in the column header... `choice_filter`

For the third question, you could use a repeat but it can be tricky to implement (see [Repeat recipes and tips](https://docs.getodk.org/form-repeats/)) and the data analysis will be more difficult - as the results from the repeats will be saved to a separate spreadsheet.

If there are not a very large number of buyers, you can create a satisfaction question for each one and only show the ones necessary using [relevant](https://xlsform.org/en/#relevant).

Example: [Buyers\_satisfaction.xlsx](https://forum.getodk.org/uploads/short-url/nh7jtZ8bHX76O90RR8zZhZ8ReC.xlsx) (10.2 KB)

 ![Screen Shot 2022-06-13 at 4.20.57 PM](https://getodk.b-cdn.net/uploads/default/original/3X/d/4/d4c0b72d14a759af833ebc0f08d0b669f811b273.png)

---

<div class="post-metadata">

**Author:** ![ODK\_Ekomer](https://getodk.b-cdn.net/user_avatar/forum.getodk.org/odk_ekomer/32/18125_2.png) [@ODK\_Ekomer](https://forum.getodk.org/u/ODK_Ekomer)\
**Post date:** [June 13, 2022, 8:31pm UTC](https://forum.getodk.org/t/ranking-importance-of-a-previous-questions-answers-multiple-answers/37960/6 "2022-06-13T20:31:11Z")

</div>

This is great, this way makes a lot of sense. I appreciate your help @danbjoseph, thanks!

Bana
