Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
IMPORTANT security patches for GeoAnalytics Server available to download: READ DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to get count??

I am loading only one column from Qvd

Orders:

Load Order_No

From c:\ORD.qvd(Qvd);

I want to get the cont of distinct Orders_No into script and store in the variable at the script level only.

Hoe to do this?

Thanx in Advance..!!

1 Solution

Accepted Solutions
Not applicable
Author

Hi, you need to load your table in temporary table usuing COUNT(DISTINCT YOUR_VALUE).

To read the value and insert into a variable, use the function PEEK;

Ex.:

Orders:

Load Order_No

From c:\ORD.qvd(Qvd);

NOCONCATENATE

TMP:

LOAD COUNT(Distinct Order_No) AS Qty

RESIDENT Orders;

LET vQty = PEEK('Qty', 0, 'TMP');

DROP TABLE TMP;

View solution in original post

4 Replies
Not applicable
Author

Hi, you need to load your table in temporary table usuing COUNT(DISTINCT YOUR_VALUE).

To read the value and insert into a variable, use the function PEEK;

Ex.:

Orders:

Load Order_No

From c:\ORD.qvd(Qvd);

NOCONCATENATE

TMP:

LOAD COUNT(Distinct Order_No) AS Qty

RESIDENT Orders;

LET vQty = PEEK('Qty', 0, 'TMP');

DROP TABLE TMP;

shaik_basha
Creator III
Creator III

Hi,

Please check the application,by using peek function you can take value into variable.

Regards

Not applicable
Author

Thnx.. It is perfect..

shaik_basha
Creator III
Creator III

Sorry,

  Please find the attachment of applicatio,

Regards