I want to calc the total distinct label counts over a period time.
Eg. I have below 4 sample data
Metrics Labels TimeStamp Values
cpu_usage{instance="192.168.100.10:20001",job="node2"}@1646225640 => 4
cpu_usage{instance="192.168.100.10:20001",job="node1"}@1646225700 => 5
cpu_usage{instance="192.168.100.10:20001",job="node3"}@1646225760 => 3
cpu_usage{instance="192.168.100.10:20001",job="node2"}@1646225820 => 4
So if I check startdate=1646225640, enddate=1646225700, I got 2 distinct jobs, which are node2 and node1
if I check startdate=1646225640, end date=1646225820, I got 3 distinct jobs, which are node1, node2, and node3.
Is there a way in promql can do this?
