# "Time at value" aggregation doesnt work

**URL:** <https://forums.losant.com/t/time-at-value-aggregation-doesnt-work/4506>\
**Category:** Help\
**Tags:** dashboard, gauge\
**Created:** [May 3, 2022, 5:15pm UTC](https://forums.losant.com/t/time-at-value-aggregation-doesnt-work/4506 "2022-05-03T17:15:04Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jonathan\_Calderon](https://avatars.discourse-cdn.com/v4/letter/j/ecccb3/32.png) [@Jonathan\_Calderon](https://forums.losant.com/u/Jonathan_Calderon)\
**Post date:** [May 3, 2022, 5:15pm UTC](https://forums.losant.com/t/time-at-value-aggregation-doesnt-work/4506/1 "2022-05-03T17:15:04Z")

</div>

Hello Losant Team!

The configuration of my gauge:

 ![image](https://us1.discourse-cdn.com/flex015/uploads/getstructure/original/2X/6/65da4c8262ed34226b8e51fb73d36389171d3f00.png)  
To consider:

- WaterOn is a boolean variable and contain data. I know this because i saw it in the “Data Explorer”
- The context variable contain a default value that is a ID of a device.
- In “match value” i use 1,0,true,false but always get n/a

Any idea?  
Thanks 🙂

---

<div class="post-metadata">

**Author:** ![Brandon\_Cannaday](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.losant.com/brandon_cannaday/32/14_2.png) [@Brandon\_Cannaday](https://forums.losant.com/u/Brandon_Cannaday)\
**Post date:** [May 3, 2022, 5:26pm UTC](https://forums.losant.com/t/time-at-value-aggregation-doesnt-work/4506/2 "2022-05-03T17:26:30Z")

</div>

As a quick test, I attempted to reproduce your configuration and did not experience any issues:

 ![image](https://us1.discourse-cdn.com/flex015/uploads/getstructure/original/2X/b/b1355ba2ec87f15c0d4c4b2c41ba6c3356b42db3.png)

Here’s my attribute:

 ![image](https://us1.discourse-cdn.com/flex015/uploads/getstructure/original/2X/6/633d8994e7a77adebc709c48a8d960c024c76f4d.png)

One thing I can’t see in your screenshot is the duration. The default value for this block is “Last received data point”, which does not work for the “Time at Value” (TaV) aggregation. TaV will calculate the amount of time an attribute has been equal to the provided value over the provided duration.

---

<div class="post-metadata">

**Author:** ![Brandon\_Cannaday](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.losant.com/brandon_cannaday/32/14_2.png) [@Brandon\_Cannaday](https://forums.losant.com/u/Brandon_Cannaday)\
**Post date:** [May 3, 2022, 5:34pm UTC](https://forums.losant.com/t/time-at-value-aggregation-doesnt-work/4506/3 "2022-05-03T17:34:14Z")

</div>

Another thing to verify is that the device exists. In my testing, an invalid duration results in an error, not “n/a” like you’re experiencing. However, if I delete the device that I previously configured as the default context variable value, I do receive the “n/a”.

Open the dashboard settings and select the Context tab. Verify that the device you have selected as the default value for `devId` still exists.

---

<div class="post-metadata">

**Author:** ![Jonathan\_Calderon](https://avatars.discourse-cdn.com/v4/letter/j/ecccb3/32.png) [@Jonathan\_Calderon](https://forums.losant.com/u/Jonathan_Calderon)\
**Post date:** [May 3, 2022, 5:36pm UTC](https://forums.losant.com/t/time-at-value-aggregation-doesnt-work/4506/4 "2022-05-03T17:36:59Z")

</div>

Thanks for the reply Brandon. At least i know that the configuration is correct. If i found the solution i will write here.

---

<div class="post-metadata">

**Author:** ![Jonathan\_Calderon](https://avatars.discourse-cdn.com/v4/letter/j/ecccb3/32.png) [@Jonathan\_Calderon](https://forums.losant.com/u/Jonathan_Calderon)\
**Post date:** [May 4, 2022, 12:40pm UTC](https://forums.losant.com/t/time-at-value-aggregation-doesnt-work/4506/5 "2022-05-04T12:40:33Z")

</div>

I found the solution. Basically when i added the gauge i was testing with a test device. Now i use the real devices and i forgot that the variable name changed. Sorry and Thanks
