How to properly create a formula field using embedded data? | XM Community
Skip to main content
I am trying to create an embedded data field that takes the ratings of three questions (single select scale 1-5) and creates an average. Efficient (Number) = ${q://QID2032/SelectedChoicesRecode} Easy (Number) = ${q://QID2033/SelectedChoicesRecode} Emotion (Number) = ${q://QID2034/SelectedChoicesRecode} CX (Number)= $e{ ( q://QID2032/SelectedChoicesRecode + q://QID2033/SelectedChoicesRecode + q://QID2034/SelectedChoicesRecode ) / 3 } It doesn't return any data. Is there something wrong in my formula? Thanks, Melissa
You should be able to do this through Scoring. https://www.qualtrics.com/support/survey-platform/survey-module/survey-tools/scoring/
Scoring is a useful tool, but it doesn't allow for equations. You should just need to add the ```${ }``` back in where you removed it. I think I also used to have issues with spaces, but I can't remember for sure. Try: CX (Number)= $e{(${q://QID2032/SelectedChoicesRecode}+${q://QID2033/SelectedChoicesRecode}+${q://QID2034/SelectedChoicesRecode})/3}
Thanks Kate...I tried it but still no data comes through. Any other thoughts? I'm so frustrated...
> @Melissa_Kaiser_psu89 said: > Thanks Kate...I tried it but still no data comes through. > > Any other thoughts? I'm so frustrated... Your original equation is correct (spaces are required). The problem must be with your piped values. Some examples: they aren't all numbers (e.g. multi-select would be a comma separated list), it isn't a valid pipe for the question type(s), or the QIDs are wrong.
Thanks Tom...you were right. I went back to my original equation and changed what I piped in. Now I see data for the most recent 6 responses but nothing beyond that. Is there some reason it doesn't show data for all my records? Is there something else I have to do? Thanks so much for your help! Melissa
> @Melissa_Kaiser_psu89 said: > Thanks Tom...you were right. I went back to my original equation and changed what I piped in. Now I see data for the most recent 6 responses but nothing beyond that. Is there some reason it doesn't show data for all my records? Is there something else I have to do? > > Thanks so much for your help! > Melissa If the formula wasn't correct when the respondent took the survey, the field won't be populated. I think you can create a new field in Data & Analysis and create a formula there to do the calculation.
Thanks...that's what I was afraid of! I need to be able to pull this data into an existing dashboard and I don't think I can with the calculated field in Data & Analysis. I wonder if there's a way to go back and populate the embedded data field correctly so I can use it in the dashboard? Any thoughts?
> @Melissa_Kaiser_psu89 said: > Thanks...that's what I was afraid of! I need to be able to pull this data into an existing dashboard and I don't think I can with the calculated field in Data & Analysis. I wonder if there's a way to go back and populate the embedded data field correctly so I can use it in the dashboard? Any thoughts? Two ways: 1. Manually edit the responses where the value is missing 2. Update the embedded field using the API, see: https://api.qualtrics.com/reference#update-response-1