City Average Population – connected to the City filter
avgOver(Population, [City], PRE_FILTER)
State Average Population – connected to the State filter
avg(Population, [City, State])
Requirement
When a user selects a City (e.g., C1) from the City filter, I want the State filter to automatically update to the corresponding state (e.g., Bihar), so that:
The City KPI reflects the selected city
The State KPI automatically shows the related state, without requiring a second manual selection.
Open to Alternatives
I’m open to removing the State filter completely, as long as the State Average KPI updates automatically based on the selected City.
Hi @Purushothaman, you can implement behavior like this using Table visuals and parameters instead of standard Filter visuals.
For example you can create 2 Table visuals, City_vis and State_vis and 2 string parameters CityParam and StateParam. City_vis should have 2 columns with City and State, but State should be hidden.
Then use navigation Navigation actions to set/reset values:
in City_vis: CityParam=City and StateParam=State.
in State_vis: StateParam=State and CityParam=‘’ or whatever you want.
It’s easy for single select, but if you want to use multiselect you have to use more columns and calculated fields of average complexity to store several values in these 2 parameters. And don’t forget to highlight selected row[s] to make it user friendly. Just in case, all this staff related to selecting many rows in a table was discussed in the community several times.
You’re right that cascading filters with “Show relevant values only” can help narrow down options. However, the main limitation of cascading filters is that they still require manual selection in filter.
My Use Case:
I have two KPI visuals: one based on City, the other based on State
When a City is selected, I want the corresponding State to be automatically selected—without requiring the user to pick it manually
Why Single-Select?
I’m using single-select to keep things clean and focused for the user, since each KPI should reflect only one City or one State at a time
It also simplifies parameter logic and avoids confusion in the visuals.
Appreciate your input—happy to hear if you’ve seen this solved in a different way!
Ok i got that .. thanx for explaining.
If you keep the city cascade to state, the state will be anyway pre-populated anyway no?
Also there might be a situation here same city name can be found in more than one state just a thought.
If users are specific to state, the RLS can also be applied, just thinking out loud :).
Hi @Purushothaman, thanks for tagging me to your post. Apologies for the delayed response as I was on leave for a week.
A state can have multiple child cities, but a city always has one parent state.
There are no cities with the same code (e.g. C1, C2) across different state.
If both of the above assumptions are true (please pardon my ignorance on Indian cities), the city filter alone can uniquely identify the parent state. So why not simply apply the same city filter to both two visuals and have only one control for city, since you are open to removing the state filter completely?
Then, if you want to show the parent state for the user selected city, you can be creative with calculated fields and table visual to display just that, like in the following example.