Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
QlikWorld online is next week! REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Johnnyg248
Contributor III
Contributor III

Straight Table Row Count

I have a straight table that has 20 columns in it and is filtered by 6 list box selections

The selections I have made result in about 7000 rows being returned

If I change the selections the straight table is repopulated very quickly

I was hoping to put the number of rows in the title for which I posted and received a solution to do a list of dimensions in a count(disinct

='Query Results (' & (Count(distinct ID&FULL_NAME&LAST_NAME&FIRST_NAME&PREFIX&Member_Type&Category& BIRTH_DATE& COMPANY&ADDRESS_1&ADDRESS_2&CITY& state_province&zip& FAX& WORK_PHONE&email&EXCLUDE_MAIL& EXCLUDE_EMAIL)) & ' Rows )'

 

This results in an out of memory error.  Guessing because this is being applied to every row prior to the filters ????

 

I was thinking of just putting the row count in a text box after the straight table has been populated

 

not sure how to get row count  after straight table is populated

 

Thanks!!

 

 

 

 

 

1 Solution

Accepted Solutions
marcus_sommer
MVP & Luminary
MVP & Luminary

I think you don't need to count over all 20 fields which are included within the table else those ones are enough which deliver an unique combination of your data. This means that maybe a count(distinct ID) or count(distinct ID&Category) might be working.

- Marcus

View solution in original post

6 Replies
dplr-rn
Partner
Partner

The out of memory can be due to multiple things (poor data model etc.)

assuming its all ok

i can think of 2 ways

1- use GetSelectedCount to ensure filters have been selected before displaying the count expression

2- depending on your datamodel check if you can add the combination mentioned as a column in the fact table i.e. ID&FULL_NAME&LAST_NAME&FIRST_NAME&PREFIX&Member_Type&Category& BIRTH_DATE& COMPANY&ADDRESS_1&ADDRESS_2&CITY& state_province&zip& FAX& WORK_PHONE&email&EXCLUDE_MAIL& EXCLUDE_EMAIL as UniqueIDs

and do count distinct there

marcus_sommer
MVP & Luminary
MVP & Luminary

I think you don't need to count over all 20 fields which are included within the table else those ones are enough which deliver an unique combination of your data. This means that maybe a count(distinct ID) or count(distinct ID&Category) might be working.

- Marcus

Johnnyg248
Contributor III
Contributor III
Author

perhaps I should be using a table box instead?

dplr-rn
Partner
Partner

Not sure what you mean.
Like marcus is suggesting, identify the unique id or combination which will indicate a row in your table
marcus_sommer
MVP & Luminary
MVP & Luminary

If there are no measures within the table you could use a tablebox which would be in general more performant as a straight table but you would loose some possibilities to apply conditions and/or format something and so on. If it's helpful in regard to your wanted expression within the title - I think rather not.

Is these row-information only for you within the desktop client you could also look in the Qlik task-bar to see how many columns and rows an active object has.

- Marcus

Johnnyg248
Contributor III
Contributor III
Author

Turns out there was error in my data model.   

='Query Results (' & (Count(distinct ID)) & ' Rows )'

 

works now

 

Thanks!