Skip to main content
Announcements
Qlik Community Office Hours, March 20th. Former Talend Community users, ask your questions live. SIGN UP
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to count number of rows ?

I have created a Straight table which has multiple rows of data?

I want to count the number of rows and shown it in another KPI ?

Please help me do it in Qliksense .

Thanks,

Nitesh

18 Replies
Not applicable
Author

Hi Sunny ,

Thanks for your response.

Unfortunately we have 70 + fields. And it would be difficult to make changes again and again.

Could you please advise if there is any other alternative.

Thanks

sunny_talwar

Once again, I have no idea and I don't think I can answer without having a look at what you have. I am extremely sorry my friend.

rittermd
Master
Master

If you put rowno(total) as a measure in your table you will see the count increment on each row of your table.  The final row will have the total number of rows in the table.  Will that work for you?

Not applicable
Author

Hey I am using row number function and then totaling it up. The row number show repeating  1, 1, 1, 1, 1,  in each row. Any idea how to get consecutive numbers 1 ,2 ,3,4,5

sunny_talwar

Mark just mentioned in his response

RowNo(TOTAL)

Not applicable
Author

It seems taking the RowNo(TOTAL) and showing it in the table itself would be the best solution. I think , I should drop the plan of showing it in another KPI.

trdandamudi
Master II
Master II

Give a try on the below and see if it works for you in a text box:

=Count({$<[$(=Concat({1}distinct $Field,']=,[')&']=')>} PK)

=Count( DISTINCT $(=Concat({1}distinct $Field,'&')))

HowToCount_NumberOf_Rows.jpg

Note: I just made few changes and hope this is what you are looking for. I know you mentioned that you have 70 fields and you no need to type them here and the formula will get the fields names automatically.

luiluigi
Contributor II
Contributor II

I had the same issue as Nitesh.

I added a new field fldRow to my table in load script and fill in the value RowNo(TOTAL) as Mark advised and the problem was solved...

ademireva
Contributor
Contributor

It works perfectly fine for my case, thank you