# New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
See why BI users voted Qlik #1 in 11 categories. GET REPORT
cancel
Showing results for
Did you mean:
Highlighted
Contributor II

## Populating Dimension Filter Using Only Aggregate Function

Hey Guys,

Need your help to solve this problem

I have two Dimensions namely : Country and States

i am using the Country dimension as a variable and making its selection possible using a variable drop down.  Also i have another dimension filter of states where i am using Qlik Native filter.  What i want to do is, whenever i am selecting India in my country variable, i want it to show me only relevant states and if US then the states of US.

 Country State India Delhi India Mumbai India Tamil Nadu India Rajasthan India Kolkata US Calafornia US Texas US Florida US Washington

for country i am using \$(vCountry) and for State i am using [State] dimension as a native filter.

to calculate this i used Only function :

=Aggr(Only({<product={'\$(vBU)'}>}[SP Name]), [SP Name])

But what happens is that if i select a country India, it shows me all the states of India and when i select a state, except the selected state all the other Indian States disappear. All i want is to retain those indian states as well.

Labels (9)

• ### Qlik Sense

1 Solution

Accepted Solutions
Highlighted
Contributor II

well i found the solution to do this.

you could use the below given expression to populate that

=Aggr(Only({1<product={'\$(vBU)'}>}[SP Name]), [SP Name])

Well definitely thats simple solution to a simple question.

3 Replies
Highlighted
Partner

hi

why don't you use the native filter for both country and state

it make that much more sense , and it will allow you to not waste time on this matter

Highlighted
Contributor II

@lironbaram there was an ask for it and to maintain a consistency, but the business requirement changed recently and converting it to native filter would be a lot of hardowork

Highlighted
Contributor II

well i found the solution to do this.

you could use the below given expression to populate that

=Aggr(Only({1<product={'\$(vBU)'}>}[SP Name]), [SP Name])

Well definitely thats simple solution to a simple question.