Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Count Rows in Table Diagramm

Hi, I am pretty new to Qlikview and got the following issue.

I created a table diagram like:

column A | column B | column C | column D
Value A         Value A     Value A          10
Value A         Value A     ValueB            20
Value A         Value A     Value C          3
Value A         Value B     Value A          12
Value C         Value A      Value A         77


and so on.


Now I want to know, how many lines do I have in this diagram?
When I use the count or text count function, Qlikview always counts the amount of rows in the root table ( database ).
I just want to know how I can count the lines / rows I got in the respective table diagram.

Thanks for your input,

Regards Mathias

1 Solution

Accepted Solutions
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

In a straight table, the number of rows will be equal to the number of unique dimension combinations. For a tablebox, the combinations will include all rows. So you can calculate the presumed row count in your title like:

=Count(Distinct [column A]&[column B]&[column C])

-Rob

http://robwunderlich.com

View solution in original post

11 Replies
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

    You can add a new expression as Rowno().

    This will add numbers to chart rows.

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
SunilChauhan
Champion
Champion

Please see the attached file.

Sunil Chauhan
its_anandrjs

Hi,

You also try to create Recno() in your load script that will create a Record no then you use it on the script.

See the attached file.

Regards,

Anand

Not applicable
Author

Hi Guys,

thanks for your example files and answers.
I got it in the lines with the RowNo() expression. Now I try tro get this value into the title of the diagram.
Any thoughts on this.

Thanks so much Guys.

Regards,
Mathias

Not applicable
Author

Hi Mathias,

You could load the rowno() or recno() as 'fieldx' in your table.

After that you can set the title in the diagram to ='Number of rows: ' & max(fieldx)

Regards,

Bert

Not applicable
Author

Hi Bert,

Sorry for raising stupid questions: And how to I load the rowno() as "fieldx" in my table?


Thanks;
Mathias

Not applicable
Author

Hi Mathias,

Stupid questions do not exist.

Here is an example:

load a,

       b,

       rowno() as "Some sources rowno"

from 'some source.xls'

Regards,

Bert

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

In a straight table, the number of rows will be equal to the number of unique dimension combinations. For a tablebox, the combinations will include all rows. So you can calculate the presumed row count in your title like:

=Count(Distinct [column A]&[column B]&[column C])

-Rob

http://robwunderlich.com

Not applicable
Author

Rob! You made my day. That's exactly what I was looking for! great....


Cheers from Germany,
Mathias