Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

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

Count Rows in Table Diagramm

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

11 Replies

Count Rows in Table Diagramm

Hi,

    You can add a new expression as Rowno().

    This will add numbers to chart rows.

Regards,

Kaushik Solanki

chauhans85
Esteemed Contributor

Re: Count Rows in Table Diagramm

Please see the attached file.

Re: Count Rows in Table Diagramm

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

Count Rows in Table Diagramm

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

Count Rows in Table Diagramm

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

Count Rows in Table Diagramm

Hi Bert,

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


Thanks;
Mathias

Not applicable

Count Rows in Table Diagramm

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

Count Rows in Table Diagramm

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

Count Rows in Table Diagramm

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


Cheers from Germany,
Mathias

Community Browser