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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to only reduce rows in a straight table via filters

I have a straight table with columns a,b,c,d,e,f.

And three listboxes to filter on a,b,c.

I need to further filter on d,e,f via a UI button to only reduce the current recordset defined by a,b,c.  Wherein a reduction should occur if d is some value  (or) e is some value (or) f is some value.

Is this possible in Qlikview?

8 Replies
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Are columns d, e and f dimension or expression columns? You can't select expression values. Clicking in a cell in an expression column will simply select all dimension values used to calculate the expression value.


talk is cheap, supply exceeds demand
Not applicable
Author

D,e,f are currently dimensions.

3 sql tables(two data tables(table1,table2) and one bridge table for them) were joined to form one Qlikview table.  Table1 is left joined to the bridge table and table2 is full joined to the bridge table.  The reason for this was to find all records in table2 that don't have a path back to table1.  D = the value of the key in the bridge table for table2, e = the value of the key in the bridge table for table1 and f = a specific column in table1 to additionally filter on.

I'm adding 'null' into d,e if isnull () to track those not linking back to table1.

The use case explained knowing the above info.  I need to further filter what is currently selected by a,b,c to only show records when d = null (or) e = null meaning there are no records for table2 in table1 (or) f = 10 meaning if d and e are not null and there is a record in table1 I need to further show only records where none equal 10.

I have a feeling there is a much simpler way to do this?

Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

If you create one table in the script then add a flag field to that table to mark the records you're interested in. You can then use that flag field to select those records. That's the easiest solution. Making 'OR' selections over multiple fields is rather complicated.


talk is cheap, supply exceeds demand
Not applicable
Author

Thank you Gysbert.  This looks like a great approach.  Simple and fast.

It's not quite working however.  When I said I need to further show only records where none equal 10, none means "for all records having a common a,b,c value combination" only show them if none of them have f = 10.

Right now my logic in script is below which is not fulfilling the last dimension f.

if(IsNull(d), 'YES', if(IsNull(e), 'YES', if(f = 10, 'NO', 'YES))) as [My Flag]

Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Like this maybe? If(IsNull(d) and f<>10, 'Yes',if(IsNull(e) and f<>10, 'Yes', 'No'))


talk is cheap, supply exceeds demand
Not applicable
Author

I am seeing records with YES and some with NO.  For a given a,b,c wherein they are all the same values and all of their f values = 20 however, they are all marked as NO.  They should all be YES.

if 1 or more of those in the a,b,c group contain a 10 for f, they should all be marked NO.  Just stating that for clarity.

Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Please post a small Qlikview document that illustrates the problem.


talk is cheap, supply exceeds demand
Not applicable
Author

Hi Gysbert.  Let me try to create that for you.  In the meantime to visually show you something, i've attached an image showing some mock data in all tables and really the logic i'm after in the resulting table.

One more thing.  I updated the lettering to be contiguous through each table.  For example where I mentioned 'f' previously, I updated it to be c.

datalogic.png