If-else condition in dashboard

Hello, dears!

Please, help me to understand, it is possible to realize logic like this in dashboard variables:

The variable var1 can have two values: value1 and value2. When var1 = value1, the variable var2 is assigned var2 = value3. When var1 = value2, the variable var2 is assigned var2 = value4.

It may helps in case, when i have big dashboard about 1 data center (with included panels about errors in logs in services) and 2 data center (with other types in cervices ans other type logs).
Just wanna switch all context info in one dashboard. Not possible to create two dashboards by some reasons.

As you described it, you have a one-to-one relationship.
value 1 > value 3, value 2 > value 4
Why do you want to map this with two variables?

My description was in short format, real case looks like this:
dashboard contains much panels with query in logs, depends of data center info.

As a result, scenario should looks like:

  1. Choose Data center 1, then in all panels query should contains this (with help of variables):
    a. area = DataCenter1
    b. problems = Problem1
    c. clients = Client1
    and etc

  2. Choose Data center 2, then variables:
    a. area = DataCenter2
    b. problems = Problem2
    c. clients = Client2
    and etc

And I still only see a one-to-one relationship.
Datacenter_1… everything 1
Datacenter_2… everything 2

I dont get it :wink:

Okay, maybe my fault - bad explanation, but in example above described current problem - need to switch var1 - from DataCenter1 to DataCenter2 in dashboard and other variables, like area, problems, clients and end should automatically changed to everything2. It is possible to realize?

You are generally able to create variables with dependencies.
In the variables section…
Variable-1 can be used in Variable-2 and so on.

  1. define Var-1
  2. define Var-2…select bla … where bla = ‘$Var-1’…whatever/ as an example