Skip to main content
Announcements
Customer Spotlight: Discover what’s possible with embedded analytics Oct. 16 at 10:00 AM ET: REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Issue with use of Expression for a dimension box

Hi,

In our application, we are using an expression to show list of people. The expression is basically a filter which needs to be applied on run time based on user choices.

e.g. If I want to show list of employees using (New Sheet Object> List box), I use the expression option under general tab. PFA screenshot. Now total employees I retrieved from QVD is 100. Based on the expression, I show only 80 of them.

Issue: If a user makes right click on the list box and does "Select All", Qlikview selects all 100 and respective data changes in other portlets that are linked to the list box.

Is there any way that Qlikview can refer to the list of employees prepared on run time using the expression?

Please help! Really need solution at earliest.

P.S. Doing this filtering on script side (and so creating a field for filtered employees) is possible but it would mean I need to create entire Pivot table of 15 columns with employee as dimension in script after agregrating over 20 million records over 6000 employees. And also include more columns to handle user choices.

Thank you.

Viraj

5 Replies
swuehl
MVP
MVP

Could you post your field expression so we can actually see how your filter works?

Not applicable
Author

Hi,

I can not provide the expression. I can provide more details on what it it like.

I have some daily data related to each employee for last one year. I have total of about 20 million such records spread over 6000 employees. I prepare about 20 columns e.g. column1, column2, column3  on UI side and use them as expression in pivot table. Dimension of pivot table is employee_id. Since Qlikview makes the job of aggregation over employee)id as dimension easily.Based on a requirement I need to show only the employees that have column1 value greater than 100 and column2>0. And some different condition for column3.

I put the conditions for these columns in the expression and so decide if I need to display an employee and his data or not.

This is the expression I am using for list box of employees.

Hope you can help.

swuehl
MVP
MVP

Well, you don't need to provide confidential data of course. But you should be able to provide the structure of your list box field expression.

For example, you can filter a list box like

=if(UserID > 100, UserID)

to see only the UserIDs above ID 100.

I am pretty sure, if you 'Select All' on such a list box, only the UserIDs above 100 are going to be selected.

I believe the expression you are using in your listbox is much more complex, but I think you should tell us the details, so we don't have to guess wildly.

For example, are you using advanced aggregation / set analysis? I believe it should be possible to post some 'look alike' expression, again, without the need to post any confidential data.

Not applicable
Author

Hi,

you are right. Here is the look alike expression I am using for the list box

if (

Aggr(($(vFormula1)), Employee)<>0 or

Aggr(($(vFormula2)), Employee)<>0 or

Aggr(($(vFormula3)), Employee)<>0 or

Aggr(($(vFormula4)), Employee)<>0 or


Employee ,null() )

Where Formula1,2,3 and 4 are some numeric calculations that involve simple addition, division, multiplication operations.

This expression is stored in a variable vSeletedEmployee.

I am using $(vSeletedEmployee) in the expression of the list box. So the employee who has value of all these formulae = 0 , he or she will be hidden.

Hope it helps to clarify.

This filtering works properly except for right click select all option of list box in Qlikview.

swuehl
MVP
MVP

Ok,

I tried to reproduce your problem by creating a simple sample file, please see attached. I failed in reproducing your issue, 'Select All' applied to the filtered list box does only select the shown employees.

I think I missed something essential. Can you check and update my sample?