Adding limit to query end value

Hello,
i got a dashboard that displays a Value that comes out of a query to influx and i want to add a limit to it in the end of all. Any ideas? Thx.

Welcome @ducktales77 to the Grafana forum.

Depending on which query language you are using with InfluxDB, you can use one of the following to limit the number of rows returned.

Hello, thank you for the welcome and hello to all!
I am in flux and would like to limit the end result that is displayed in the dashboard coming by a query… Thank you!

What is your Flux query?

“query”: “from(bucket: "mda-ds")\r\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\r\n |> filter(fn: (r) => r["_measurement"] == "oee")\r\n |> filter(fn: (r) => r["_field"] == "OEE")\r\n |> aggregateWindow(\r\n fn: mean,\r\n column: "_value",\r\n every: if int(v: v.windowPeriod) > int(v: 5m) then v.windowPeriod else 5m,\r\n createEmpty: false,\r\n )\r\n |> mean()\r\n |> group()\r\n |> pivot(rowKey: ["_measurement"], columnKey: ["_field"], valueColumn: "_value")\r\n |> yield(name: "All durations")”,

Please use the Preformatted Text option when posting code (you can go back and edit your post above to make it more legible).

In what you posted, I do not see any limit function being used.

“query”: “from(bucket: "mda-ds") |>range(start: v.timeRangeStart, stop: v.timeRangeStop)
 |> filter(fn: (r) => r["_measurement"] == "oee")
|> filter(fn: (r) => r["_field"] == "OEE")
 |> aggregateWindow(\r\n fn: mean,\r\n column: "_value",\r\n every: if int(v: v.windowPeriod) > int(v: 5m) then v.windowPeriod else 5m,\r\n createEmpty: false,\r\n )\r\n |> mean()\r\n |> group()\r\n |> pivot(rowKey: ["_measurement"], columnKey: ["_field"], valueColumn: "_value")\r\n |> yield(name: "All durations")”,

sorry, im not sure how to limit the value that is in the dashboard in the end…

Hi, the dashboard shows just a number and the question is how to add a linit in the end…

Did you read / try this?

thx but i found out that it limits the rows… – i want to limit the end - value that is displayed in dashboard…

@ducktales77

Do you mean truncate the number of digits being displayed to the right of the decimal?

vs

no i mean if the value 9 is bigger than 10 then show 10 , not more…

I am thoroughly confused :confused:. Maybe someone else can help.

Please show what you exactly mean by providing some csv sample data or some picture