Urgent help about referencing time in transformations

Hello all,
I am trying to find the number of pipelines converted into MW2 allowlisted per day. For that I need to divide the number of MW2 allowlisted pipelines by the total number of days in the time range selected. I am trying to do this through “Add Field from Calculation” under transform. I am just not sure how to bring in the number of days in the range selected by a user.

I even tried to look for a variable something like timespan but I could not find it. I would really appreciate some help on it.

-Thanks

Try this:

Change the Min Interval to 1d

Thanks for the reply fadjar340!
I tried as suggested but I think I am still not getting what I want. As you can see in the second “Add field from calculation” window under Transform, I am trying to divide the stale pipelines by the number of days in the time range selected but I do not see that in the dropdown yet. How do I make this option for the total number of days in the selected range appear in that dropdown?

I would really further guidance.

-Thanks

May I see the query to get the metrics?


Yes, I have attached the screenshot of the two queries I have used. Also, for further explanation, I am trying to graph the number of stale pipelines which is done and the number days needed to convert those stale pipelines into fresh pipelines. In order to calculate “the number days needed to convert those stale pipelines into fresh pipelines” I am thinking of calculating the rate by the number of fresh pipelines divided by the no. of days in the time range selected by the user. So in a way the number of days should be a variable, I cannot use a constant for that. Afterwards, I will multiply the number of stale pipelines with the rate to get the number of days needed to convert them into fresh pipelines.

I hope this explanation will further help you to guide me!

-Thanks!

Perhaps you can check this post…

Also this documentation:


Hi,
Thanks for all the help!
I am thinking of solving the issue by using derivative to find the rate. For now, I am trying to create gauge visualization for the two calculations under “Transform”. I am stuck at it because Grafana is somehow showing the graph for the two queries and not the two transformations I want.

I would really appreciate some help on this.

-Thanks