(Using JSON API datasource)
I have a grafana dashboard with a table and two dashboard variables, var1
and var2
.
var1
is custom defined by a user selection (3 possible predetermined values) and var2
by a query.
I want to set up a data link with a URL to be used when clicking on a value of the column number
.
The URL should look like the following by default:
https://test.com/${var1}/${__data.fields["number"]}
However, I want this URL to change only if var1
is equal to its third possible value, let’s call it x
to simplify.
Here are the conditions if var1
is equal to x
:
After the value of var1
in the URL, append the following : /name/${var2}/
followed by the rest of the URL.
So when var1
is equal to x
the URL will look something like this :
https://test.com/x/name/(value of var2)/(value of data field number)
So how could I achieve something like this? Is there a way to use conditional statements in Grafana for variables, and if not, a workaround for it?
Thanks in advance