Calculating Survey Respondent Age from Year of Birth | XM Community
Skip to main content

Hello,

I’m looking for any advice or assistance in calculating a survey respondents age using a Year of Birth. The survey taker only provides the Year, no month, no day so as an example it would be 2025-1987=38. If i could set this up either as embedded data or right in a dashboard it would be helpful for demographic analysis.

 

The advice from the AI Chatbot was incorrect 

 

I have reviewed these in previous Community posts, but just seeing if there is another simpler way to do this?

 

 

Hi ​@gdyczyak ,

 

You can create an embedded data using ${date://CurrentDate/Y} to get current year in the survey flow.

Then, use math operator $e{ e://Field/CurrentYear - q://QID6/ChoiceTextEntryValue } to get the age.

 

Please change q://QID6/ChoiceTextEntryValue to your question’s input.


@gdyczyak, Please let me know if the way suggestd by ​@Chee Heng_SZ  worked.
Thanks.


Leave a Reply