How can I count the different values on one embedded data ? | XM Community
Skip to main content
Solved

How can I count the different values on one embedded data ?

  • June 8, 2022
  • 4 replies
  • 400 views

Forum|alt.badge.img+1

Hello all,
To explain my question, I will take a small example:
Let' s say that in my survey, I collect one embedded data through the link which would be an animal specy.
For instance, I collect 5 answers:
Answer 1: Cat
Answer 2: Cat
Answer 3: Lion
Answer 4: Tiger
Answer 5: Tiger
What I would need is to create a data "Feline" that would automatically count the different type of species I collected. So in my case, Feline = 3 (Cat + Lion + Tiger).
Does anyone know if it's doable on Qualtrics ?

Thanks in advance

Best answer by Rudi

yes you can do this.

in the survey flow by using branches
countFeline = 0
if q1 selected choices == cat then countFeline =countFeline +1
if q1 selected choices == lion then countFeline =countFeline +1

if q1 selected choices == tiger then countFeline=countFeline +1

4 replies

Rudi
QPN Level 3 ●●●
Forum|alt.badge.img+16
  • QPN Level 3 ●●●
  • 162 replies
  • Answer
  • June 8, 2022

yes you can do this.

in the survey flow by using branches
countFeline = 0
if q1 selected choices == cat then countFeline =countFeline +1
if q1 selected choices == lion then countFeline =countFeline +1

if q1 selected choices == tiger then countFeline=countFeline +1


Forum|alt.badge.img+1
  • Author
  • 2 replies
  • June 8, 2022

https://community.qualtrics.com/XMcommunity/discussion/comment/46810#Comment_46810Okok
And can I generalize it ? Like increment the Feline value automatically everytime a new value (that I can't predict) appears on the embedded data ?


Rudi
QPN Level 3 ●●●
Forum|alt.badge.img+16
  • QPN Level 3 ●●●
  • 162 replies
  • June 9, 2022

Hi there,

haven't had this requirement myself so far. But this is what I would try:
Use Text iQ in the survey flow and categorize possible inputs by topics
Text iQ-Powered Survey Flows
Then I would go for using these topics for the branches to increase the respective counters.
Hope this helps,
Best regards

Rudi


Forum|alt.badge.img+4
  • Level 4 ●●●●
  • 103 replies
  • November 1, 2023

In the answer proposed here, will it not mark the embedded field as 1 everytime cat appears. It means if I use this field in dashboard, I would still get the count as 5 and not 3 right ?