Dear all,
I’m trying to get a gauge (i think this is what I want) panel that should show 2 values: members of an AD group - members in that AD group that have logged to a system.
I get all the information from 2 queries that I join based on a common field. At the end I end up with a table like:
one of the values should be 103, the one coming from “username (count) → 1” , and the other value should be either the sum of all (a value that represent the totality of users) or the sum of the "username (count) " with a value different to 1 (18+55+74+16+5+2+3).
I’ve been playing with transformation but I cannot achieve what I want so, at this point I’m wondering if this is something doable in grafana or that infor should be provided from my script → datasource.
any advice is apreicated,
Best,
What is your datasource/query? Why you can’t write query with required grouping directly?
Hi @arnaubria,
Yes, this can be done in Grafana using two Gauge panels with the same queries.
Panel 1: Value 1 (103)
Transformation: Filter data by values → Include → username (count) → Is equal → 1.
Value options: Calculation = Total; Fields = username (count) (count).
Panel 2: Other values (173)
Transformation: Filter data by values → Exclude → username (count) → Is equal → 1.
Use the same Value options as Panel 1.
Set Standard options → Max to 276 if you want each gauge to show its proportion of the combined total.
If you prefer a single panel, return the two aggregated values from your query or script as separate rows and use Show: All values.
thanks a lot for the answer. I ended up playing with the qeury to endup with a table like this:
I’d like to have all in a single gauge where potential users i the max and real users a subset of it.
I kind of can do it defining the max in standard options:
but is there a way to combine the two values in single gauge using one value as max?
again, thanks for the answer.
Best,