Hello I am trying to do sum(value)/countif(station, limit_test = 0) However, got an error Nesting Aggregate function is not allowed.

Limit_test is also a calculated filed. maybe that’s causing the problem? but I have tried making Limit_test as calculated field from the dataset as well but showing the same error. how can I go around it? thank you.

Solution to this depends on what limit_tests actually is. Assuming you defined that as a sum() of something (say tests field), maybe you could try changing it to and seeing if it makes sense:

@darcoli so instead of filter out by using 0,1. I am doing this to get Avg(Values) that are within Low and High Limit.

ifelse (sumover(sum(value),[station,date] > low_limit AND sumover(sum(value),[station,date] < High_limit,sumover(sum(value),[station,date] ,0)

However, the avg is including 0 in calculation instead of totally omitting it . If I can find a way around to not include 0 in avg calculation, I think it will work. what do you think?

Do you got a solution for this? I am also using countif function and getting error in another calculated field where i am using this countif function field. Please let me know, thank you.