Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
@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:
@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:
Seems to work well!
Great!