Select to view content in your preferred language

Multiple drop down menus to filter plots/tables

1781
12
Jump to solution
04-19-2022 07:44 AM
Ed_
by MVP Regular Contributor
MVP Regular Contributor

Good day all,

I am trying to create a web app in Insights Desktop such that the app has two drop down menus:

  1. One for variable of interest 
  2. Second for location

As you can see I can select the location column in the 2nd drop down since it's a single column. However, I am unable to select multiple columns (each column representing a different variable, 5 columns/5 variables in my case).

If it it was possible to select multiple columns from a drop down menu, then for example, the user would first select the variable of interest let's say `avm`  that would then show `avm` values for different cities depending on the selection from the 2nd drop down menu. Then if the user selected the variable `flood factor` it would filter location values to `flood factor`.

Is it possible to select multiple columns for a drop down menu in Insights desktop? Such an option will save me from creating separate plots for each variable.

If not can you please have option in the next release?

As such an option will really make the app concise, neat and clean.

Please note that both the drop menus are based on the same dataset.

SaadullahBaloch_0-1650379421459.png

 

Question | Analyze | Visualize
0 Kudos
2 Solutions

Accepted Solutions
Scott_Aulen
Esri Contributor

With a big hat tip to @WarrenDavison, here's what I suggest.

Predefined filters are designed to filter values within a column (i.e., variable) and not the variable itself.  To accomplish this we'll need to reshape the data (in this case wide to tall) so that these variables become string values within the the dataset.

I've taken the following dataset which has 4 variables and transformed from wide to tall.

Scott_Aulen_2-1650475603668.png

This allows me to create two Predefined filters:

1. Variable filter (Population, MedianHomeValue, Employees, MedianAge)

2. State filter

Scott_Aulen_3-1650476473401.gif

This is a fairly simple example but hopefully it illustrates the concept.

@Ed_ will this work for what you're trying to do? 

 

Scott

 

 

View solution in original post

Scott_Aulen
Esri Contributor

That's correct, you'd want Option 2.  You want to move all three variables (FF, AL-2021, AL-2051) to one column (which you have labeled variable).

View solution in original post

12 Replies
LauraBecht
Regular Contributor

Hi Saadullah,

There is a way to filter using multiple columns, you would use the advanced filter option in the predefined filter.  You can select non null values for each column as a separate option in the filter, then go from there.

Regards,

Laura

Ed_
by MVP Regular Contributor
MVP Regular Contributor

@LauraBecht ,

Thank you for the quick response, so what function should I use in the query? 

My columns of interest for the 1st drop down menu are:

  • Flood Factor
  • avm
  • adapt_type
  • adapt_name
  • adapt_rp
Question | Analyze | Visualize
0 Kudos
LauraBecht
Regular Contributor

I don't think i completely understand your goal.  You want to select a given city, then you want to select for combinations of these variables?  At one time dynamically?

0 Kudos
Ed_
by MVP Regular Contributor
MVP Regular Contributor
  1. So I want the user to be able to select a variable of interest out of the 5 total variables (5 columns). let's say the user selects `avm` out of the 5 available options from the 1st drop down menu.
  2. Then the user will select the city (`cities` column) from the 2nd drop down menu. Let's say the user selects Coconut Creek.
  3. The app will then filter the map and table to show `avm` values for Coconut Creek.
Question | Analyze | Visualize
0 Kudos
Ed_
by MVP Regular Contributor
MVP Regular Contributor

@Scott_Aulen when you have the time, can you please also look into this?

Thank you,

Question | Analyze | Visualize
0 Kudos
Scott_Aulen
Esri Contributor

I've looked at this a bit but haven't been able to fully explore.  Hoping to find some time this afternoon.

Ed_
by MVP Regular Contributor
MVP Regular Contributor

Cheers mate

Question | Analyze | Visualize
0 Kudos
Ed_
by MVP Regular Contributor
MVP Regular Contributor

Good day @Scott_Aulen,

If the intended purpose in the post is not currently possible in Insights, should I post in Insights Ideas too?

Thank you,

Question | Analyze | Visualize
0 Kudos
Scott_Aulen
Esri Contributor

With a big hat tip to @WarrenDavison, here's what I suggest.

Predefined filters are designed to filter values within a column (i.e., variable) and not the variable itself.  To accomplish this we'll need to reshape the data (in this case wide to tall) so that these variables become string values within the the dataset.

I've taken the following dataset which has 4 variables and transformed from wide to tall.

Scott_Aulen_2-1650475603668.png

This allows me to create two Predefined filters:

1. Variable filter (Population, MedianHomeValue, Employees, MedianAge)

2. State filter

Scott_Aulen_3-1650476473401.gif

This is a fairly simple example but hopefully it illustrates the concept.

@Ed_ will this work for what you're trying to do? 

 

Scott