title: How to ignore empty dataseries in prometheus
body: <p>Calculating the maximum quantile over all dataseries is a problem for me:</p>
  
  <p><strong>query</strong></p>
  
  <pre><code>http_response_time{job=~"^(x|y)$", quantile="0.95",...}
  </code></pre>
  
  <p><strong>result</strong></p>
  
  <pre><code>http_response_time{job="x",...} 0.26
  http_response_time{job="y",...} NaN
  </code></pre>
  
  <p>This is how I would try to calculate the maximum:</p>
  
  <pre><code>avg(http_response_time{job=~"^(x|y)$",...})
  </code></pre>
  
  <p>Now the result will be "NaN". How can I ignore the "NaN" result (from the result section)?</p>
  
  <p><strong>UPDATE 0</strong></p>
  
  <p>The metric is a self made summary-metric.</p>
  
  <p><strong>UPDATE 1</strong></p>
  
  <p>Using prometheus version 1.8.</p>