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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
EugeniaCastillaFragoso
Partner - Contributor III
Partner - Contributor III

Make dimension in table show the same values selected in a filter pane of a different dimension

Hi everyone. I am having some issues doing a task. I have a filter pane with a dimension called , let's say, dimensions A. I then have a straight table with many dimensions, one of them B. This 2 dimensions are not conected in any way and they should stay that way. What i want is, if the user selects a value of dimension A, in the straight table, I should only see for dimension B the value selected. 

Let me put an example:

Dimension A has these values: 1111,2222,3333,4444,5555,6666,7777,88888,9999,0000

Dimension B has these values: 1111,2222,3333,4444,5555,6666,7777,121212,323232,0000

 

If the user selects in dimension A a value, value 2222, and that value exists in dimension B then...

That same value, as it exists on dimension B, should get selected as well and filter the table accordingly. 

 

I tried something like this-> 

=Aggr(Only({<B, A= P(B)}>} B), B) but it is not working

Please keep in mind that i dont have access to the script

Labels (1)
6 Replies
forte
Partner - Creator
Partner - Creator

Hi @EugeniaCastillaFragoso 

If I have undestood, your user is going to make his selections on A dimension. If so, your calculated dimension should look like this

=aggr(Only({<A,B=P(A)>} B),B)

Hope it helps

Regards

Taoufiq_Zarra

@EugeniaCastillaFragoso 

here is an example :

Suppose I have this Input:

TableA:
load * inline [
Dimension A
1111
2222
3333
4444
5555
6666
7777
88888
9999
0000
];

TableB:

load * inline [
Dimension B,Value
1111,1
2222,2
3333,3
4444,4
5555,5
6666,6
7777,7
121212,8
323232,9
0000,10
];

no relation between Dimension A and Dimension B

I create straight table  with Dimension B and Value

Dimension :

=Aggr(Only({<[Dimension B]= {$(=chr(39)&GetFieldSelections([Dimension A],chr(39)&','&chr(39))&chr(39))}>} [Dimension B]), [Dimension B]) 

 

output:

if I select one value In Dimension A:

Capture.PNG

or many

Capture.PNG

Regards,
Taoufiq ZARRA

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

(you can mark up to 3 "solutions") 😉
EugeniaCastillaFragoso
Partner - Contributor III
Partner - Contributor III
Author

@forte first of all thank you for your answer!!!!

this is only showing the values that the 2 dimensions share....so it doesn't work

i tried to put it in an if, so 

if(getSelectedCount(A)>0,your-expression, B)

But this makes it worse, it is just not working   😞 

EugeniaCastillaFragoso
Partner - Contributor III
Partner - Contributor III
Author

Hi @Taoufiq_Zarra , this isn't working for me, it is showing nothing! could you pass your file so I can see exactly what you did??? Because the idea is there! thank you

Taoufiq_Zarra

@EugeniaCastillaFragoso 

attached qvf file

 

Capture.PNG

Regards,
Taoufiq ZARRA

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

(you can mark up to 3 "solutions") 😉
forte
Partner - Creator
Partner - Creator

Sorry @EugeniaCastillaFragoso , I think I misundestood your scenario.

Show you need something like this 

forte_0-1603877668718.png

 

So your calc dimension should look like this

=aggr(Only({<A,B=P(A)>} B),B)
&
aggr(Only({<A,B=B-P({1} A)>} B),B)

Attached example I used

Hope it helps

Regards