Select to view content in your preferred language

Survey123 Summary Report Max Date Statistic

06-20-2022 12:08 PM
New Contributor II

Hello fellow survey123 leveragers. I have a need to create a report from a survey which I imagine will need to include some combination of a summary and repeat section.

Here is the survey123 layer name and the corresponding fields from my survey that will be used for the report:

Layer: ${#Yard_Operations}



  • Date field.


  • This is a select one from a list of yards.


  • This is a select one yes/no question indicating whether survey submitters fed during their visit.


Ideally, a very simple version the report will look something like:



In the above, the yard column would pull all unique (as there can be multiple submissions per yard) uhb_yard values, and the fed column would pull a statistic (max) of the date_visited field based on the query: where fed = 'yes.' Blanks would indicate there have been no submissions for that yard where fed='yes.'

Any help is appreciated, even confirming that this is not possible so that I may stop pursing is great. Once/if I figure this out I would like to add more columns to the report with other yes/no questions with dates on them. Thank you in advance!

0 Kudos
1 Reply
Esri Regular Contributor

Hi @RodrigoLopez ,

Something like below may help. The syntax for the stats part is stats: "<statisticType,statsField,outFieldName>":"<groupByField>":"<havingClause>", where havingClause is left empty (but need to present) at this time.  Please see for details.




${#Yard_Operations | where:”1=1” | stats:”max,date_visited,latestVisit”:”yard”:”” | orderByFields:”yard ASC” }