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

Why doesn't Qlikview have a built-in method to return the number of rows currently displayed in a table

It baffles me seeing so many people trying to figure out how to return something that seems so simple and struggling with it so much.

Myself included.

Why doesn't Qlikview have a simple function for a straight table as an example called DisplayedRowCount() or similar?

Today i'm working on an app that has a straight table for output as one example.  Columns display and hide based on user filter selection.  I can't seem to keep a correct count of rows currently displayed.

I've tried "1 AS #MyCounter" for each record loaded in script.  This works until columns start to hide and the automatic Group By happens in the table.

I've tried Count and Count Distinct for every column in the straight table and none of those options maintain the count that's currently visible in the table.

I've tried RowNo from script, but this blows up my result set in my data model to trillions of rows wherein I need group by to happen at that level.

I'm at a loss right now.  Any other ideas I can try?

14 Replies
adinning
Partner - Contributor II
Partner - Contributor II

Do you want this as it's own column or just a total value on your sheet?

Peter_Cammaert
Partner - Champion III
Partner - Champion III

You can add an expression to your straight table like:

=NoOfRows(Total)

But then what is the relevance of such a counter?

swuehl
MVP
MVP

Yes, agreed that this could be made more simple.

Have a look at

Number of rows in straight/pivot table into a variable?

Hence, try something like

=Count(DISTINCT Dim1 & Dim2 & Dim3)

to get the number of rows in your table chart.

edit: I assume the OP wants to get the number of rows in global chart context, like the table caption.

martinpohl
Partner - Master
Partner - Master

if you are in the client and you click on a table (table box, straight table or pivot table) you can see the number of rows and columns in the right corner

Not applicable
Author

Thanks Martin.

This isn't an option as users are using the web-based access point.  I also need this value to display in the "Window Title" of the Straight Table.

Not applicable
Author

Hi swuehl.  I tried this and I always get back a value of 1.  In case it matters I need this value shown in the "Window Title" of the Straight Table.  My code is: =Count(DISTINCT [Product Name] & Price & Customer)

Not applicable
Author

Hi Peter.  I tried this and I always get back a value of 1.  In case it matters I need this value shown in the "Window Title" of the Straight Table.  My code is: =NoOfRows(TOTAL)

Not applicable
Author

Hi Andrew.  I want to display this in the "Window Title" of the Straight Table.

swuehl
MVP
MVP

Seems to work for me, in my sample app attached on left side.