Qlik Community

Ask a Question

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Announcements
March 11, 2PM EST: Do More with Qlik - Getting Started wtih Qlik Sense SaaS - Redux. REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
simoj89
Contributor II
Contributor II

Filtering different columns in OR/AND

Hi! 

In Qlik sense is possible to have some user filters working in OR  instead off AND?

For exemple, see this table:

id | Country | Year

0 | US | 2020

1 | US | 2021

2 | JP | 2020

3 | IT | 2019

If i create two filter for Country and Year and Choose US as Country then the Year Filter will show only 2020 and 2021 as choosable, 2019 wolud be in gray and if i choose it it will disable the Country Filter and show me only IT in Country Filter.

 

I'm asking if there is a way for filter US on Country OR Year = 2019, so i'll see the record with ID 0,1 and 3.

 

Is a manageble issue?

 

Thanks

 

Labels (4)
1 Solution

Accepted Solutions
Taoufiq_Zarra
Master II
Master II

@simoj89  Maye be you can use data island as :

in the load script for example for this sample you can add :

Data:
load * inline [
id,Country,Year
0,US,2020
1,US,2021
2,JP,2020
3,IT,2019
];

Country:
load Country as FilterCountry resident Data;

Year:
load Year as FilterYear resident Data;

then create new filtre FilterYear and rename Year

create new filtre FilterCountry and rename it Country

Finaly create new filtre as :

=aggr(Only({<Country={$(=chr(39)&GetFieldSelections(FilterCountry,chr(39)&','&chr(39))&chr(39))}>+<Year={$(=chr(39)&GetFieldSelections(FilterYear,chr(39)&','&chr(39))&chr(39))}>} id),id)

and rename it id

the output:

Taoufiq_Zarra_0-1614075830706.png

 

Taoufiq_Zarra_1-1614075851650.png

 

Taoufiq_Zarra_2-1614075870466.png

 

 

 

Regards,
Taoufiq ZARRA

"Please LIKE posts and "Accept as Solution" if the provided solution is helpful "

(you can mark up to 3 "solutions") 😉

View solution in original post

2 Replies
Taoufiq_Zarra
Master II
Master II

@simoj89  Maye be you can use data island as :

in the load script for example for this sample you can add :

Data:
load * inline [
id,Country,Year
0,US,2020
1,US,2021
2,JP,2020
3,IT,2019
];

Country:
load Country as FilterCountry resident Data;

Year:
load Year as FilterYear resident Data;

then create new filtre FilterYear and rename Year

create new filtre FilterCountry and rename it Country

Finaly create new filtre as :

=aggr(Only({<Country={$(=chr(39)&GetFieldSelections(FilterCountry,chr(39)&','&chr(39))&chr(39))}>+<Year={$(=chr(39)&GetFieldSelections(FilterYear,chr(39)&','&chr(39))&chr(39))}>} id),id)

and rename it id

the output:

Taoufiq_Zarra_0-1614075830706.png

 

Taoufiq_Zarra_1-1614075851650.png

 

Taoufiq_Zarra_2-1614075870466.png

 

 

 

Regards,
Taoufiq ZARRA

"Please LIKE posts and "Accept as Solution" if the provided solution is helpful "

(you can mark up to 3 "solutions") 😉

View solution in original post

simoj89
Contributor II
Contributor II

Seems to work well! 

 

Great!