Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi, I'm noob in Qlikview. I have two lists and only one SQL with 3 records, one of the lists must have two records and the other 3, how do I do that?
I don't know if I'm missing something here but using an expression as the field for a list box seems to meet the requirement you just outlined. It would be easier if you provided a sample of the document so I could see what you're working with/the progress you've made so far. Maybe we're just misunderstanding each other so I've provided an example of a list box that contains 3 records and only displays 2 of them using the method I outlined above. You don't have to filter the SQL in order to create the attached document and it will give you one fewer than the number of records that you have in the listbox (based on what you set it to in the expression). Additionally, as you can see, when you load the attached document the list box is already filtered and will affect other selections.
I'm not really sure what the context is of what you're trying to do but I think what you're looking for is a resident load. You can load the full table then use a resident load for the second table to filter the criteria down to two records. See example below
Load Field1,
Field2;
SQL Select Field1,
Field2
From SQLTable;
Load Field1,
Field2
Resident Where Field1 = 'Criterion';
Ok but I can not change my SQL, it should be the same, just need to do the filter in the list box
Both lists used the same SQL loaded (3 records), only one will have 2 records and one all 3 records.
When you're creating a list box you can select "<Expression>" in the filed dropdown which will let you enter something like the following: If(Match(Field1,'Value1','Value2'),Field1). But performance wise it may make more sense to create another field in the table for this.
I appreciate your help, but actually this is not what I need, I'll try to explain better:
First, forget the two lists before, we will work with only one.
I have a SQL query that returns me 3 records, I can not filter this SQL, when I load these 3 records in the list box needs to show only two, need to hide one of the records in the list box making me return just 2 records.
IMPORTANT: This list should come already loaded in the opening of the project and selected values will impact the rest of the same project.
I don't know if I'm missing something here but using an expression as the field for a list box seems to meet the requirement you just outlined. It would be easier if you provided a sample of the document so I could see what you're working with/the progress you've made so far. Maybe we're just misunderstanding each other so I've provided an example of a list box that contains 3 records and only displays 2 of them using the method I outlined above. You don't have to filter the SQL in order to create the attached document and it will give you one fewer than the number of records that you have in the listbox (based on what you set it to in the expression). Additionally, as you can see, when you load the attached document the list box is already filtered and will affect other selections.
It worked, sorry, I did not understand the above explanation, it was simpler than I thought. Thanks man!
No problem, sorry for the misunderstanding.