Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
kvr9
Creator
Creator

Restrict the filter

Hello,

I need some help on filters.

My data model contains 35 countries  and has two different values such as Sales and spends all countries have Sales but only few countries have spends data.So when I enter into the Spend related data sheet the country with spends should be active and other countries should be grated out.

I tired triggers like Onactive Spend >=0 and it works for me but it is populating in Current selection filed and if try to clear it all countries are active again.

Could some one help me to resolve it.

1 Solution

Accepted Solutions
12 Replies
Anonymous
Not applicable

You can apply filter while loading the data

prat1507
Specialist
Specialist

=if(aggr(Count({<Spends -= {"=IsNull(Spends)","=len(Spends)=0"}>} DISTINCT Country),Country)>0,Country) 

kvr9
Creator
Creator
Author

Hi Pratysuh,

Could you please tell me where can i use this expression.

Can you please tell me the option using set variable

prat1507
Specialist
Specialist

Add a listbox. and add an expression as the above to get all the Countries as per your requirement.

Regards
Pratyush

kvr9
Creator
Creator
Author

hi ,

I can see the result as below,I just want to see only one line and inactive country in greytestcntry.PNG

prat1507
Specialist
Specialist

do you want all the countries or only those where Spend>=0?

Regards
Pratyush

prat1507
Specialist
Specialist

Go into the presentation tab and enable the Single column option.desk.png

kvr9
Creator
Creator
Author

1st I want spends>0 and if possible all countries where spend related countries active and other as inactive

kvr9
Creator
Creator
Author

My issue is not showing in single column but the data I can see Austria two times.

I just want to see it one time