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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Linking listbox to Calculated dimension

Hi,

I am new to QlikView and have run into a problem. I would appreciate it very much if someone could guide me to a solution.

I have a calculated dimension, say CD, in a pivot table.

This calculated dimension is dependent on the value of a slider.

I need to link CD to a list box so that the user can filter the records in the pivot table.

I using the same CD in the listbox but have not been able to get the result.

Again, I would be extremely thankful if someone could help me.

Thanks in advance,

Gary

1 Solution

Accepted Solutions
s_uhlig
Partner - Creator
Partner - Creator

Hi garymokha,

you can use

=aggr(if(MARKS/100<=THRESHOLD,'PASS','FAIL'),MARKS)

as the listbox-expression and qlikview will select the corresponding records.

Regards

Sven

View solution in original post

6 Replies
SunilChauhan
Champion II
Champion II

i am not understanding clearly

but hope below help

take a list box and write same expression as CD in list box

Sunil Chauhan
jonathandienst
Partner - Champion III
Partner - Champion III

Hi Gary

If Sunil's suggestion does not work, then I suggest that you post your model, or a sample of it.

Regards

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Not applicable
Author

Below is attached a sample of what I am trying to achieve.

As you will see, the listbox does not work.

Regards,

Gary

s_uhlig
Partner - Creator
Partner - Creator

Hi garymokha,

you can use

=aggr(if(MARKS/100<=THRESHOLD,'PASS','FAIL'),MARKS)

as the listbox-expression and qlikview will select the corresponding records.

Regards

Sven

Not applicable
Author

Hi S.Uhlig,

I have another question, what if instead of MARKS, I had something like this in the IF condition:

if(PRODA_SALES/TOTAL_SALES>=THRESHOLD,'A',

IF(PRODB_SALES/TOTAL_SALES>=THRESHOLD,'B','NEITHER'))

what would I use as dimension in the AGGR function?

Btw, your suggested method worked perfectly for the sample I posted, but I have a more complex requirement as well (as posted in this post). Would be grateful if you could suggest a solution for this.

Thanks,

Gary

s_uhlig
Partner - Creator
Partner - Creator

Hi Gary,

of course, it depends highly on our model and therefore the only suggestion I can give, is that qlikview does the selection based on the aggr dimensions.

Imagine a table like

LOAD * INLINE [

    id, a, b

    1, 2, 5

    2, 3, 4

    3, 4, 3

    4, 5, 2

    5, 5, 5

];

now you want a selection where a+b<10. You can do something like aggr(a+b<10,a,b), which selects a=[2..5] and b=[2..5] when you press true (-1) in your listbox.

This could be okay, but in our situation we don't want the combination a=5 and b=5. As you can see, we have to rely on column id, because it's reflects the relation between a and b. With the expression aggr(a+b<10,id) we accomplished the desired behavior.

Nice? Maybe we don't want to expose our technical key id to the ui, but now it appears whithin the current selections - okay we are back at step 1 - it depends on your model and what you want to do with it.

Regards,

Sven