Product: Grafana Cloud
I have a products
multi-select template variable which returns a number of product GUIDs, and a single Stat panel that repeats on the values of this variable. Some products may have a number of “child products”, returned in a frame like so:
What I’d like to accomplish is to essentially add a “button” to my stat panel and use a data link on that “button” to filter the selection of the products
variable to the child GUIDs.
I have the visuals mocked up the way that I want, but I’m struggling to access all of the child GUIDs
(Don’t mind the ugly data link names…I was trying everything to see what sticks)
${__value.text}
or ${__value.raw}
seem like the ones that I’d want, but they always show as NaN
.
The closest I’ve been able to get is by concating &var-products
with each GUID, adding a Reduce transformation to aggregate all of the GUIDs into a single row:
Then using the Rows to Fields transformation to take the array of GUIDs and set it as the field name and use the ${__field.name}
variable in my data link
Problem is, I’m now left with those pesky commas at the end of each GUID, and I haven’t been able to figure out how to get rid of them.
Should I be taking a totally different approach? Or are multi-valued data links like this not possible to achieve?