Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
JamFisher1
Employee
Employee

Show filter list items based on other filter items

Hi All,

I have two tables like FORM and PAGE,  which are concated and differentiated by table flag. My table below

ID USER_ID ASSET_NAME WEBPAGE_ID Table_Flag
1 10002 FormName1 578390 Form
2 10004 FormName2 578391 Form
3 10006 FormName3 578392 Form
4 10008 FormName2 578391 Form
5 10010 FormName2 578391 Form
6 10012 PageName1 578390 Webpage
7 10014 PageName2 578391 Webpage
8 10016 PageName3 578392 Webpage
9 10018 PageName4 578393 Webpage
10 10020 PageName5 578394 Webpage


Now I would like to show the Asset names based on selection in below filter pane. 

JamFisher1_0-1701693015077.png
Please note I could able to show the ASSET_NAME based on Table_Flag in above "page" and "forms" filter boxes but what I want to show is 
For ex:
A ) In "Page" box, If I select "PageName2" from "ASSET_NAME" column it should fetch its "WEBPAGE_ID", that is 578391 and match it with "WEBPAGE_ID" where "Table_Flag = Form" and show only "FormName2" in "Forms" box and it should show only 1 time, even though it has 3 entries. 
B) And It should also count "USER_ID" related to  above selection, that it 10004, 10008, 10010 ( 3 users )

Thank you all in advance. 

 



1 Solution

Accepted Solutions
Gabbar
Specialist
Specialist

I hope these are the results you want:
When Nothing Selected:-

Gabbar_0-1701752442448.png

When PageName2 Selected :-

Gabbar_1-1701752476573.png

. But these are aggregated on WebPageID means in filter selection shown Above it will show Webpage_ID selected.
The expressions are:-
For Page:-=aggr(Only({<Table_Flag={'Webpage'}>}ASSET_NAME),WEBPAGE_ID)
For Forms:-=aggr(Only({<Table_Flag={'Form'}>}ASSET_NAME),WEBPAGE_ID)

View solution in original post

8 Replies
Gabbar
Specialist
Specialist

Try using calculated Dimension, Calculate according to your needs and aggregate then,

like 
aggr(only(ASSET_NAME),ASSET_NAME)

Now if you use this as a filter it will only show values according to other filters, 
But Just to be safe side
Use:- aggr(only({<ASSET_NAME>}ASSET_NAME),ASSET_NAME)

Because in previous one if you selected an ASSET_NAME then it will only show that ASSET_NAME in filter pane, and thus you wouldnt be able to select others.

JamFisher1
Employee
Employee
Author

Thank you for reply. 
I tried like below for "forms" filter box

=aggr(only({<Table_Flag = 'Form'>}ASSET_NAME),Table_Flag = 'Webpage',ASSET_NAME)

And for "page" box, like below
=if(Table_Flag = 'Webpage',ASSET_NAME)

But not showing any result.
1 ) here please let me know how this will fetch the selection from "page" filter pane 

 

vincent_ardiet_
Specialist
Specialist

Try those expressions:
aggr(only({<Table_Flag = {Form}>}ASSET_NAME),ASSET_NAME)
and
aggr(only({<Table_Flag = {Webpage}>}ASSET_NAME),ASSET_NAME)

JamFisher1
Employee
Employee
Author

Thank you for reply.
I tried this and still not working.
when I select values from "page" filter pane, it is not showing any data related to my selection in "form" filter pane

JamFisher1_0-1701698541054.png


Here is the illustration on what I am trying to achieve

As per my above description
Before selection : 
before.png

After selecting "PageName2", 
after.png

It should show only "FormName2" bcoz it has the same "WEBPAGE_ID"

vincent_ardiet_
Specialist
Specialist

You can use this but not sure to understand the purpose:
=Aggr(Only({<ASSET_NAME,Table_Flag = {Form},WEBPAGE_ID=p(WEBPAGE_ID)>}ASSET_NAME),ASSET_NAME)

And
=Aggr(Only({<ASSET_NAME,Table_Flag = {Webpage},WEBPAGE_ID=p(WEBPAGE_ID)>}ASSET_NAME),ASSET_NAME)

Gabbar
Specialist
Specialist

I hope these are the results you want:
When Nothing Selected:-

Gabbar_0-1701752442448.png

When PageName2 Selected :-

Gabbar_1-1701752476573.png

. But these are aggregated on WebPageID means in filter selection shown Above it will show Webpage_ID selected.
The expressions are:-
For Page:-=aggr(Only({<Table_Flag={'Webpage'}>}ASSET_NAME),WEBPAGE_ID)
For Forms:-=aggr(Only({<Table_Flag={'Form'}>}ASSET_NAME),WEBPAGE_ID)

JamFisher1
Employee
Employee
Author

Thank you @vincent_ardiet_  

JamFisher1
Employee
Employee
Author

Thank you @Gabbar . This is working as expected