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

Announcements
Qlik Connect 2026 Agenda Now Available: Explore Sessions
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Exluding data

Hi everyone!

Could you, please, help me with scripting the following. I want to exclude events (whole rows in the table)  fitting two conditions:

1) value is equal to N,

2) number of "values equal to N" is counted more than 10.

For example, there is a field 'status' with values a) single, b) married and I want to keep only 10 single ones and to delete the others.

As far as I understood, I need to use WHERE function within LOAD. But I have no idea in which way it shoukd be scripted.

Could you, please, help me with that?

Thank you!

6 Replies
rakesh_kumar
Creator
Creator

Hi Marina,

Try like this:

Load top 10 *

from New.qvd (qvd)

where status = 'single';

Here I restricted to top 10 rows. If you vae any ID field then you can modify where statement like this:

where status = 'single' and ID<=10;

I hope this helps.

Regards,

RK

Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

MyTable:

FIRST 10

LOAD * FROM ...source... WHERE Value = 'N';

Concatenate(MyTable)

LOAD * FROM ...source... WHERE Value <> 'N';


talk is cheap, supply exceeds demand
Not applicable
Author

Many thanks, Rakesh and Gysbert!

May I write it this way:

... WHERE 'Field' ='value' <>'N' ?

Or this is incorrect?

Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

To follow your example of singles: WHERE status = 'single'. Make sure to use the exact case-sensitive field names and values.


talk is cheap, supply exceeds demand
Not applicable
Author

Thank you so much, Gysbert!

oknotsen
Master III
Master III

If you consider the question answered, please flag the correct answer and close the topic.

If not, please make clear what other information you are still looking for.

May you live in interesting times!