Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
igorgois_
Partner - Creator
Partner - Creator

Filter panel using one field values and filter by another field

Hello,

I have this following table

FACT:

LOAD * inline [

Company,Category,Flag_is_client

1,A,1

2,A,0

3,B,1

4,B,1

5,B,1

6,C,0

];

 

I would like a filter panel that shows the Companys name that have flag_isclient = 1  and when the user select the company name, Qlik sanse actually filter the category linked to that company

 

I tried with aggr(company,category) but didnt work.

 

Can anyone help me?

 

Thanks in advance

Labels (3)
5 Replies
jwjackso
Specialist III
Specialist III

Try using an alternate state (ex: IsClient) on the filter pane with an expression like =If(Flag_is_client = 1,Company,Null()) to get a list of the companies.  Then in the chart where you want to filter by category, try using   P() function in Set Analysis =Count({<Category=P({IsClient}Category)>}Category)

igorgois_
Partner - Creator
Partner - Creator
Author

Thanks for your answer.

But I need to filter all the app. Not only in one specific graph

Thank you

jwjackso
Specialist III
Specialist III

Within the load script

FACT:

LOAD * inline [

Company,Category,Flag_is_client

1,A,1

2,A,0

3,B,1

4,B,1

5,B,1

6,C,0

];

CategoryFilter:

load Company as CompanyAlias,  //so it doen't filter the company

          Category

resident FACT;

Use the CompanyAlias in the filter pane;

jwjackso
Specialist III
Specialist III

 Forgot to add a where clause to limit the companies, within the load script

FACT:

LOAD * inline [

Company,Category,Flag_is_client

1,A,1

2,A,0

3,B,1

4,B,1

5,B,1

6,C,0

];

CategoryFilter:

load Company as CompanyAlias,  //so it doen't filter the company

          Category

resident FACT where Flag_is_client = 1;

Use the CompanyAlias in the filter pane;

igorgois_
Partner - Creator
Partner - Creator
Author

Thanks again for your answer.

I forgot to mention that I cant change the script.

I had already done your solution using script, but I am looking for a solution in the front end 😕

 

Thanks again