Using query summary

Hi there,

I am learning to use the query summary at the moment.

Attached is how my data model looks like.

I want the summary to count the number of live animals according to the sex of the species. When recording data, I enter number of adult male/female and therefore I don’t need an attribute to select the sex.

For the Sign-Indirect Evidence, I added the attribute sex to be able to differentiate male & female tracks.

When doing just the query, I am able to count the number of male/female for live animals but not when I am doing the summary.
Under the “Value” column, I am not allowed to select “Number of adult male” for example. Therefore, I can only have the total number of live individuals but not separated by sex.

I really don’t want (and can’t really because I already have observations) add a sex attribute to the live animal category. How can my issue be solved then?

Thank you!
Marine

Hello Marine,
For numeric attributes like your ‘Number of Adult Males’, you should still be able to summarize the data in a query. It wouldn’t be a count of observations like other categories/attributes, but you could use the ‘sum’ option to add up the total number of adult males observed. If you create a summary query, select ‘Number of Adult Males’ from the list of Value Options, and click ‘Add to Query’ (or just double-click the attribute), what happens? I was able to add a similar numeric attribute to a summary query
image

Best,
Matt

Hi Matt,

Thank you for getting back to me.

For summary query, ff I add “Number of adult males” to Value Options, I get the message “Query error” (see attached).
How do you add the “Sum” though? On summary query, I cannot see where are the mathematical expression.

Thanks.

Hi Marine,
That definitely is odd, and I suspect that query error is the problem. Could you share the error log (Help > View Error Log)? That could help us identify the problem.

Just to confirm, are you on SMART 7.5.6?

Hi Matt,

I have attached the error log but there is nothing about the query error. However,when I place the mouse on the query error I can read the attached.

Affirmative, I am on SMART 7.5.6


Error log.txt (2.8 KB)

Hi Marine,
I think there is a simple solution to this. The available aggregations for an attribute need to be specified in the Data Model. If you go to your Data Model and select that attribute, you should see the options to enable certain aggregations as in the example below. You’ll need to check the box for ‘sum’ and any other aggregations you’d like to be available for the attribute.

You should then see that available as an option when you do a summary query. Let me know how it goes.

Thank you Matt, problem solved!!