How can I sort integer data into classes, then display the relevant class in the survey form?

55
2
12-31-2019 09:48 AM
JohnMacmillan
New Contributor

My apologies if this is a simple question, I don't have a lot of experience in this realm. I was asked to create a survey form for a different group and they've got a requirement that I'm just not sure how to make happen. I've tried researching it myself but to no avail...

The data in question is percent cover, so the technician will estimate the percent cover of a given vegetation type and enter that integer into the form. Then the form would sort that data into a class or bin (i.e. 0-10%, 11-20%, etc...) and display the relevant class on the survey.

I'm guessing that I can use a note to display the end class fairly easily, but I have no idea how to make the sorting happen. Do I need to set up a series of if-then operations? Anyone care to give me an example? I'm not very well versed in xls or boolean language. I'd appreciate any help I could get.

Thanks for reading!

0 Kudos
2 Replies
DougBrowning
MVP Frequent Contributor

I do percent cover by Gap categories.  Yes you will need to set up a bunch of ifs then sum.  

Start with the if to parse it out

Cat1C      if(${Gap}>=25 and ${Gap}<=50, ${Gap}, 0)

Cat2C      if(${Gap}>=51 and ${Gap}<=100, ${Gap}, 0)

etc...

Then sum if it is in a repeat (prob is)

sumCanCat1   sum(${Cat1C})

The divide.  

${sumCanCat1} div 25

Note my denominator was static at 25.  But in another form I have to have a second calc to get the denominator.

Do not count 0 values for the denominator

nonzerowoodyhgt    if(${HeightWoody}>0,1,0)

Then use it (instead of just count(HeightWoody) as that would include the 0s).
Average Woody Height    sum(${HeightWoody}) div sum(${nonzerowoodyhgt})

Hope that helps.

JohnMacmillan
New Contributor

Thanks Doug! 

0 Kudos