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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to count the row number of a field?

Hello everyone,

I am developing a QlikView interface that display information of a school.

I need to show the total number of courses, so i have a field called "Courses", and what i need is the row number from this field, where i will have the total course number.

I am using the expression below:

RowNo([TOTAL[<Course{,Course}>]])

But this expression returns no data. Anyone can help me on this?

Thanks

6 Replies
swuehl
MVP
MVP

Try

COUNT(DISTINCT Courses)

instead.

Not applicable
Author

sum(if(courses<>null,1,0)

crystles
Partner - Creator III
Partner - Creator III

If you just need a count, in the script you can just put a 1 as Count or Sum Field.

CourseName

CourseTeacher

1 as SumCourses

This will give you a field with the number 1 in it. So all you have to do in the table is Sum([SumCourses]) to get the total number of courses.

sunilkumarqv
Specialist II
Specialist II

Hi Rodringo

hope this will help you

Script

Data:

Load

Recno() as ID,

Courses resident from datasoruce;

Expression: Count(Distinct ID)

raajaswin
Creator III
Creator III

in Script:

Table:

Load

Course,

Rownum()

Resident Old_Table;

dineshkumar
Contributor III
Contributor III

hi caldas,

        In edit script do the following to get row number there is a function called rowno() use this while loading your data for the row number. and is expression you can count.. Count( Distinct Course).

for eg:

load

name,

address,

course,

rowno() as Serial No.

from >>>>>>.