Skip to main content

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

cancel
Showing results for 
Search instead for 
Did you mean: 
mskusace
Creator
Creator

Dynamic title based on Filters and selections

I have 4 filters at the top of my Qlik Sense dashboard that are in a hierarchy.

Continent -> Country -> State -> City

I have a 4 text box fields I created at the top which use the GetFieldSelections to display the filter selected. I can't get all the text boxes to update based on the various ways users can filter the data.

My desired results:

The left hand column is the filter applied and the other 4 columns are what should be displayed in the text box.

No FilterContinent: All ContinentsCountry: All CountriesState: All StatesCity: All Cities
City Filter is BrooklynContinent: North AmericaCountry: United StatesState: New YorkCity: Brooklyn
State Filter is TexasContinent: North AmericaCountry: United StatesState: TexasCity: All Cities
Country Filter is United StatesContinent: North AmericaCountry: United StatesState: All StatesCity: All Cities
State Filter is California and OhioContinent: North AmericaCountry: United StatesState: California, OhioCity: All Cities

 

*The full answer for my implementation is on my last post in this thread. Thanks to @Shubham_Deshmukh for the assistance!

Labels (1)
1 Solution

Accepted Solutions
Shubham_Deshmukh
Specialist
Specialist

Try this now: 

=If(RangeMax(GetSelectedCount(city), GetSelectedCount(city)) > 0, Concat(DISTINCT continent, ', '))

Regards

View solution in original post

5 Replies
Shubham_Deshmukh
Specialist
Specialist

As Qlikview works on associative model functionality, if you have continent along with country, states etc.

You just need to use below expression that field like this in text boxes : 

='Continent : '& continent

='Country : '& country

//continent & country are database field

When you will select city from filter, automatically value will get appear in text box

Regards,

Shubham

mskusace
Creator
Creator
Author

When I try that in Qlik Sense, if I select 2 cities, it does not list anything for the States. If I select 1 city, it will list the proper state. It's the multiple selections that don't seem to work properly with that.

One thing to note is that there is only 1 table in my dashboard since all my data processing occurs outside of Qlik Sense. Therefore all the data is on this one table.

Shubham_Deshmukh
Specialist
Specialist

Try this now: 

=If(RangeMax(GetSelectedCount(city), GetSelectedCount(city)) > 0, Concat(DISTINCT continent, ', '))

Regards

mskusace
Creator
Creator
Author

That one works much better! 

I am running into one more issue now. I want this to apply to all the fields. 

I changed your code slightly to be:

=If(RangeMax(GetSelectedCount(city), GetSelectedCount(city)) > 0, Concat(DISTINCT city, ', ')) 

If a user selects a City or multiple cities, then all the selected Cities and associated States, Countries, Continents should show.

If a user selects a State or multiple states, then all the selected States and associated Cities, Countries, Continents should show.

If a user selects a Country or multiple countries, then all the selected Countries and associated Cities, States, and Continents should show.

If a user selects a Continent or multiple Continents, then all the selected Continents and associated Cities, States, and Countries should show or at least something saying "Multiple Selections" for Cities and States.

I hope that makes sense. 

 

mskusace
Creator
Creator
Author

I got it! Thank you so much! 

Country: If(RangeMax(GetSelectedCount(City),GetSelectedCount(State), GetSelectedCount(Continent))>0,Concat(DISTINCT Country,', '))

State: If(RangeMax(GetSelectedCount(City),GetSelectedCount(Country), GetSelectedCount(Continent))>0,Concat(DISTINCT State,', '))

City: State: If(RangeMax(GetSelectedCount(State),GetSelectedCount(Country), GetSelectedCount(Continent))>0,Concat(DISTINCT City,', '))