Is there A way to if I have a question of selection for Years inside repeat in survey123 connect to have A sum of certain other questions according to a certain year

01-19-2020 02:48 AM
New Contributor II

Hello, Can you help me here if I can get A way of how to have a sum of certain questions e.g Annual Rent for floors based on the year I selected. I have inside a selection for year and for floor. But I want a sum based on each year. Thanks!

0 Kudos
1 Reply
Esri Esteemed Contributor

Hi Alain,

If I understand you correctly, there are a couple of ways to do this:

- if you have a certain number of years to do the analysis for, you could create a calculate question in the repeat that if the year is a set year, grab the rent value, otherwise set the value to 0.  That calculate question could then be totaled with a calculate question in the parent layer with a sum() function.

- if you need to have a table breakdown as the text of a question, this may be accomplished by using a beta feature of Survey123 - custom JS functions.

0 Kudos