Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
AkbarShaikh
Contributor III
Contributor III

Count record number in a single feild

Hello Guys,
I need to limit records of a field in the script with an IF function to create a boolean statement.
example:
IF (Ordervalue = 'MET' AND (Order_number <= '15'), '1', '0') as Parameter
The challenge is that I am not able to limit the number of records from Order_number field.
Is there any way that I can limit this field to give only 15 records in the script?

Regards,

a

1 Solution

Accepted Solutions
AkbarShaikh
Contributor III
Contributor III
Author

//Solution:

Load Table 1 

Then Load Table 2 (Record Number) with a Resident Load from Table 1 with a where clause.

//Script:

Table2:

NoConcatenate

Load *,

REC NO () as field_name

Resident Table 1 WHERE Order_number = 1;   // Order_number is the unique field availible in Table 1 

DROP TABLE 1;

//END OF SCRIPT 

View solution in original post

3 Replies
sunny_talwar

Not sure I understand your issue? You want to bring only those records where Ordervalue = MET and Order_number value is less than 15?

AkbarShaikh
Contributor III
Contributor III
Author

Yes Sunny,  those two parameters are required to calulate the SLA

AkbarShaikh
Contributor III
Contributor III
Author

//Solution:

Load Table 1 

Then Load Table 2 (Record Number) with a Resident Load from Table 1 with a where clause.

//Script:

Table2:

NoConcatenate

Load *,

REC NO () as field_name

Resident Table 1 WHERE Order_number = 1;   // Order_number is the unique field availible in Table 1 

DROP TABLE 1;

//END OF SCRIPT