Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Variables as Search Objects

Is there a way to set the results of a Search Object or Current Selection window as a variable to reference in a pivot? I'm looking to limit a dimension to the variable entered by a user. It's somewhat complicated but we have leader data levels 1-10, and if the user enters the leaders name, we only want that one to appear in the pivot. I want to set one of the dimensions as that column (leader level). I'm thinking a variable/dimension limit would be the only way.

9 Replies
israrkhan
Specialist II
Specialist II

Hi, two ways coming in mind, whether they are useful for you or not..

1) Change to Straight Table, and use the dimension limits Tab, and Show only =$(Variable)..

   i assume you know how to create variable and input value, and use in dimension limits...if not

2) In Peviot Table properties, General tab, Use Calculation Condition, and can use expression like

=count(distinct [leader level])<=100, if he will select five [leader level], will see five in Pivot Table, 10 then 10 ans so on.

Not applicable
Author

Well the issue I'm having is designating the selection the user makes AS the variable. I can't figure out how to tell Qlikview that that object entry becomes the variable from the search object.

israrkhan
Specialist II
Specialist II

i did not get you properly,

but i think you are having problem in variable and inputbox, or slider, or so,

See the attached file, and example of how to use variable and inputbox, slider etc.

on second sheet you can see the pivot table , calculation condition, and on third sheet, see the slider, inputbox variable, used in straight table...

hope it helps

Not applicable
Author

I guess my real question is, can a dimension be a variable? Is there a way to tell a pivot table that one of the dimensions is based on a column selected via Search ?

tresesco
MVP
MVP

Dimension can be variable. Do you want the dimension itself (Say, Field1, Field2, ...) be variable or the dimension vaules (From Field1- Value1, Value2...)?

Not applicable
Author

I have 10 columns for level leaders (in my source data), and based on a VALUE (leader name) selected by the user I want the field name to change to that corresponding leader level. It would also be nice if the leader name can populate but its less important to me. Does that make sense?

tresesco
MVP
MVP

Not yet very sure about your requirement. Guessing, may be like attached sample.

Not applicable
Author

Sadly, I cannot open this as I have the personal edition.

How about this:

Can one designate a user selection as a variable, then use that variable as a dimension?

tresesco
MVP
MVP

Ah! YES.

Does this help?

234.png