Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Counting the output from stdev

Ok, I have a data set that includes a host of temperature values (captured over time every minute or so). I am displaying a table that includes the name of the sensor, the temperature value, and then the stdev of these measures over time.

Now, I want to display a count of the number of instances where stdev=0 - in essence, the number of devices always reporting the exact same temperature all the time.

I would have expect the following to work:

count(stdev(thermal_temp_c)=0)

However, nested aggregation is not allowed.

Anyone have a thought on another way of doing this?

Labels (1)
4 Replies
Gysbert_Wassenaar

You could try something like: count({<Instance={"=stdev(thermal_temp_c)=0"}>)Instance)


talk is cheap, supply exceeds demand
Anonymous
Not applicable
Author

Ok, progress - had to play around with it a bit, and the below works to the extent that there are no more syntax errors:

count ({<thermal_temp_c_stdev_instance={"=stdev(thermal_temp_c)=0"}>}thermal_temp_c_stdev_instance)

Only issue is that it throws a "bad field name thermal_temp_c_stdev_instance" error - which implies that thermal_temp_c_stdev_instance is not actually set. Is Sense expecting that thermal_temp_c_stdev_instance be declared explicitly as a field name prior?

Gysbert_Wassenaar

Yes, you can only use field names. Calculated dimensions and measure names won't work.


talk is cheap, supply exceeds demand
Anonymous
Not applicable
Author

Good catch, added the following to the data loader:

SET thermal_temp_c_stdev_instance = '';

Only issue is now I only see a result of "1". Odd.