Hello everybody,
I just created my first dashboard with grafana and the Infinity plugin to read in a csv file. Everything looks great on the geomap and works, except when selecting “All” in the dropdown menu.
I’ve created a Variable with the “Include All option”, but when selecting the All option the geomap is empty, showing no datapoints.
I also tried the custom all Value “.*” - (dot asterisk) with the same effect, no data shown.
Is this some limitation when using a csv file?
The Muti-Value option is also not working, because it is not using the values with an OR i guess.
What else do i need to make the All and Multi-value options work?
Variable Screenshot:
Geomap with All selected:
Welcome for forum @crashedthecymbal
Use uql or backend parser with a where clause
Something like
where $q_state=='All' or city== '$q_state'
Read the infinity uql doc
As you see in the screenshot, I am using backend parser.
If I switch to UQL, I still don’t know how to address the “All” function. So the All Value is generated by grafana thru a function I guess. How can I address that function?
If “All” is selected use any Value in the STATE field.
Using the UQL Parser will give me the Values, sort them, but how can make that “switch” work?
if All is selected - show all data
if one value is selected - show only that value
if multiple values are selected - show them
UQL Parser:
Did you try the suggested filter of using where clause
I did try, yes.
Is $dropdown the template variable name?
To get the where clause doing something I use the following syntax
| where "STATE" == 'Vienna'
This will show the “All” and the “Vienna” values
STATE is the column heading containing the values “Vienna, Salzburg, etc …”
using an “or” is not working
| where "STATE" == 'Wien' or 'Salzburg'
This will only show the “All” value.
Adapting your line like this is not working:
where $q_state=='All' or "STATE" == '$q_state'
q_state is the Template Variable name. $dropdown is not working.
Thanks again for your help 
1 Like
go with this then
parse-csv
| where "STATE" in (${q_state:singlequote})
Nope. That does not work. Only “All” is available then.
Can you please share your geomap csv ?
Working for me here.
All
2 cities chosen