I have a dataset that has market_name, which typically corresponds to a city in a state in the USA, i.e. Atlanta. For each market, there are corresponding zip_code for which I am mapping some value for. So a row in this dataset would look something like: market_name = Atlanta, zip_code = 30304, value = 56.
With this dataset, I am able to successfully create a filled map that showcases how corresponding values within each ZIP differ. At the top of the dashboard, I have a filter which allows a user to select the market_name of interest. However, I am unable to figure out how to dynamically adjust the map such that it zooms into that ZIPs corresponding to the specific market_name/city the user chooses.
Hi @apqs and welcome to the QuickSight community!
What if you tried building an ifelse statement to handle the filtering of your visual?
It would probably look something like this:
hi @Brett, thanks so much for your responseāI think I understand what you are saying. You are saying that for each market_name, choose a central ZIP such that the filled map visualizations in the dashboard will zoom into that specific area.
Hereās what Iāve done so far:
So at the top of my dashboard, I have a control that is a dropdown selection of all the markets available to view, which is a variable called market_name across all datasets used in this dashboard.
I then created a calculated field for my filled map visualizations within the dashboard called market_name_zoom wherein I wrote the following:
However, this calculated field isnāt picking up on the market_name from the dropdown menu at the top and isnāt adjusting the zoom.
When I modify the code to be ${market_name} = 'Atlanta', '30304', ... as per your suggestion, it said āErrors foundā so I removed the ā$ā and it saved without errors, but it isnāt actually doing anything.
Hi @apqs,
Sorry for the confusion. So Iām thinking you were getting an error because ${ā¦} refers to the usage of a parameter. Is your Market Name control linked up to a parameter or is it a filter control? Make sure to set it up as a parameter and then use that parameter name in the ifelse statement.
ifelse(
${Market_name_parameter} = ā¦
Using your normal market name field in the ifelse wonāt work so let me know if adding the parameter instead solves the issue.
The zoom feature can be a little fickle at times and sometimes if youāre trying to link a field thatās not geospatial (like Iām assuming the market name field may not be) youāll run in to issues with it responding to the āzoomā request.
Hi @apqs,
Following up here as itās been awhile since we last heard from you; did you have any additional questions regarding your post or were you able to put together a work around for this case?
If we do not hear back within the next 3 business days, Iāll close out this topic.
Thanks so much for your time and proposed solution; it seemed sound but when I tried it I still wasnāt able to showcase the data like I wanted. So for now, weāve decided to move onto another platform to dashboard this project. Nonetheless, thanks again for your quick response and help!