# Count of a value over time

**URL:** <https://discuss.prometheus.io/t/count-of-a-value-over-time/1376>\
**Category:** PromQL\
**Created:** [January 4, 2023, 11:13am UTC](https://discuss.prometheus.io/t/count-of-a-value-over-time/1376 "2023-01-04T11:13:23Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![rmaag](https://avatars.discourse-cdn.com/v4/letter/r/f08c70/32.png) [@rmaag](https://discuss.prometheus.io/u/rmaag)\
**Post date:** [January 4, 2023, 11:13am UTC](https://discuss.prometheus.io/t/count-of-a-value-over-time/1376/1 "2023-01-04T11:13:23Z")

</div>

Hi there.  
I have a metric (gauge) that describes the state of my system, with few Integer values. I would like to count the number of times the value is 1 (for example) for the last 24 hours. This sounds awfully simple but I can’t get it… Any suggestion?
