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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to find the number of rows for a particular field

Hi all,

How can i find the number of rows of a particular filed from the edit script.

Thanks in advance

Regards

......

1 Solution

Accepted Solutions
Not applicable
Author

Hi

I am getting like this.

Test:

LOAD F1

FROM

E:\Test1.qvd

(qvd);

Test1:

Load Count(F1) as Count

Resident Test;

Drop Table Test;

(or)

Test:

LOAD F1

FROM

E:\Test1.qvd

(qvd);

Let vCount = NoOfRows('Test1');

Regards

.......

View solution in original post

6 Replies
jvitantonio
Specialist III
Specialist III

What do you mean? Do you want to know the number or rows of a table?

CELAMBARASAN
Partner - Champion
Partner - Champion

Hi,

     Use

     NumofRows('TableName')

Celambarasan

Not applicable
Author

Hi ,

Please look into it.

Test:

LOAD F1,

          F2,

          F3

FROM

E:\Test1.qvd

(qvd);

Now i need to find the distinct number of rows of data for any F1 or F2 or F3.

I tried like this

NoOfRows('F1')   and  NoOfRows('Test')     but ididn't get.

Regards

......

Not applicable
Author

Hi

I am getting like this.

Test:

LOAD F1

FROM

E:\Test1.qvd

(qvd);

Test1:

Load Count(F1) as Count

Resident Test;

Drop Table Test;

(or)

Test:

LOAD F1

FROM

E:\Test1.qvd

(qvd);

Let vCount = NoOfRows('Test1');

Regards

.......

swuehl
MVP
MVP

If you want to get the distinct number of values in a field, use fieldvaluecount():

fieldvaluecount(fieldname)

Returns the number of distinct values in a field. Fieldname must be given as a string (e.g. a quoted literal).

Example:

let x = fieldvaluecount('Alfa');

CELAMBARASAN
Partner - Champion
Partner - Champion

Hi,

     You can try with fieldvaluecount function

     let vCount  = fieldvaluecount('F1');

Celambarasan