GoshPosh / grafana-meta-queries

Grafana plugin for calculating time period metrics like week over week, month over month and year over year etc.
Apache License 2.0
284 stars 71 forks source link

Arithmetic: Broken numbers possible #150

Closed benhartwich closed 2 years ago

benhartwich commented 2 years ago

Hi,

I am trying to get broken numbers by using arithmetic like D['in-complete']/C['in-start']. If I use table for visualizing my results I get NaN. Are broken numbers supported?

Gauravshah commented 2 years ago

duplicate of https://github.com/GoshPosh/grafana-meta-queries/issues/101

benhartwich commented 2 years ago

Sorry, I didn´t get, what might be the right solution. My time interval has already reached the maximum.

Gauravshah commented 2 years ago

if your C is NaN I am not sure how do you want to present it on your graph. But lets say you want to plot a 0 it can be done as follows: (C['in-start']>0)? D['in-complete']/C['in-start'] : 0