Pass value from one panel to another panel query

I went and ran a query on my database…

select us_state, length(us_state) from covid19ny.v_covid_us_states_count_ts

I get the correct length…

Alabama 7
Alaska 6
Arizona 7
Arkansas 8
California 10
Colorado 8
Connecticut 11
Delaware 8
District of Columbia 20
Florida 7
Georgia 7
Guam 4
Hawaii 6
Idaho 5
Illinois 8
Indiana 7
Iowa 4
Kansas 6
Kentucky 8
Louisiana 9
Maine 5
Maryland 8
Massachusetts 13
Michigan 8
Minnesota 9
Mississippi 11
Missouri 8
Montana 7
Nebraska 8
Nevada 6
New Hampshire 13
New Jersey 10
New Mexico 10
New York 8
North Carolina 14
North Dakota 12
Northern Mariana Islands 24
Ohio 4
Oklahoma 8
Oregon 6
Pennsylvania 12
Puerto Rico 11
Rhode Island 12
South Carolina 14
South Dakota 12
Tennessee 9
Texas 5
Utah 4
Vermont 7
Virginia 8
Virgin Islands 14
Washington 10
West Virginia 13
Wisconsin 9
Wyoming 7

You ran that on InfluxDB? Or is there another DB, which is feeding InfluxDB?

Let me try couple things…

Are you US local? or out of US - just to know for timing & response…

OK, let’s recap the situation. Left query seems ok, it properly populates table panel. Data link is set on the state field and when you click it, variable us_state is properly set (btw, unhide it for now, you’ll hide it later). Properly in a sense, that it contains clicked state name, like Alabama, without leading or trailing spaces.
And all this is confirmed to be good it seem the remaining issue is the right panel query, which does seem to pick up the variable properly, but somehow doesn’t spit out the expected results.
Does this describe the situation?

Europe, but I’ll still hang around for some time.

Yes -

  1. Left Panel - Mouse over - the state value changes…but for our test - I make sure to click - other than showing the ‘state_nm’ = ‘Alabama’ or something - I really don’t know if the actual variable that I created and - ‘State_nm’ is getting the value from the ‘state_nm’ capture value

image

  1. Right Panel - If I just give the actual value ‘Alaska’ - I get the results

When I pass the variable - nothing…in the main dashboard
image

It’s not getting the value. The variable, that is. In Data Link add var- in front of the variable name, so it will read like origId=1&var-state_nm=${__value.text}. And unhide the variable, Variables / state_nm / Hide / (blank).

image

This is what you suggest right?

Yes, except that for Variable / Hide, set it to blank.

Yep - done

So now when you click the link, variable should get populated and you should be able to see it on the top part of the dashboard. Can you screenshot it?

Looking good. Now screenshot the row just below the title of the dashboard.

Hey sskrlj - look at this…

Even though, I ‘Hide’ the variable - its showing up…

image

But - you see the value is getting set, as desired…you can see that on the top left corner - It shows ‘state_nm’ = ‘Arizona’

Still - the right panel - no result.

Unbelievable…

So, I went and added this variable in the Panel title - look I get the value populated

image

image

So, it is getting carried - over - but not working in the query :frowning:

OK, at least you’re good on that part. Great. Let’s investigate the right panel query. Can you show what query inspector says? I believe we already tried to punch in Alabama as query filter instead of variable, right? And it worked?

Yep - I see the value in the query…

Why is it trying to Group by 12 hrs?

Query is great, as far as state is concerned. Remove group by time($__interval) clause if you don’t need it.

Not able to change or remove the interval

And if I remove anything from here in the Group - nothing works…

But going up the post, I see the query was already working fine, with group by time(). What changed?