Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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.
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.
I hope these are the results you want:
When Nothing Selected:-
When PageName2 Selected :-
. 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)
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.
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
Try those expressions:
aggr(only({<Table_Flag = {Form}>}ASSET_NAME),ASSET_NAME)
and
aggr(only({<Table_Flag = {Webpage}>}ASSET_NAME),ASSET_NAME)
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
Here is the illustration on what I am trying to achieve
As per my above description
Before selection :
After selecting "PageName2",
It should show only "FormName2" bcoz it has the same "WEBPAGE_ID"
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)
I hope these are the results you want:
When Nothing Selected:-
When PageName2 Selected :-
. 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)
Thank you @vincent_ardiet_
Thank you @Gabbar . This is working as expected