Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
On Demand Webinar: See Why Thousands of QlikView Users Have Switched to Qlik Sense. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Conditional selections

Hello all,

This is my first post here, and I'm hoping this isn't a ridiculously easy question!

Within a table of 20-odd fields, I want to make a selection based on two, called "SBU" and "Item gp". I would like to automate a selection where the following arguments are true:

Either SBU="E25M"  *or*  (SBU="E25D" and left([Item gp]<>"DC")

So I'm trying to select all records in the table where either the SBU is E25M or the SBU is E25D *and* Item gp does not start "DC". I've tried various methods and can't find a way to do this which doesn't end up either including or exluding records incorrectly.

I don't mind whether the solution is some kind of list box or whether it involves scripting (haven't done any yet in Qlikview but no stranger to VBA scripting in Excel, for example).

As I said, I really hope this isn't a ridiculously simple question but even if it is, it has me stumped! Any help would be *very* much appreciated.

Many thanks,

Simon

1 Reply
nagaiank
Specialist III
Specialist III

One of ways of doing this is in the script.

In your script, loading the 20-field table, add the following:

Table:

Load *,If(SBU='E25M' or(SBU='E25D' and left([Item gp],2)='DC'),'REQUIRED','NOT REQUIRED') as Selection;

Load SBU, [Item gp], ..(all other fields) from (your data source);

Then create a listbox for the field Selection.