Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Read about the latest Qlik Community enhancements on the Community News blog!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to Calculate TOTAL Count of rows for an expression

I have a Expression that shows a list of Projects or items. Its tied to a Alternate state I would like to Calculate the Total count of rows for it without having to use the built in Total mode. Reason is I want to place it in on a different location.

I was considering using these functions, but have had any success.

NoOfRows() function or Count( TOTAL )  not sure what to use to replicate this TOTAL mode option.

2013-05-03_102341.png

1 Solution

Accepted Solutions
Gysbert_Wassenaar

If you simply want a count of the rows in a chart object you can use something like this:

Count({Alt_State_Here} aggr(1, Dim1, Dim2, Dim3 etc))

Replace Alt_State_Here with the name of your alternate state and Dim1, Dim2, Dim3 etc with the dimensions of your chart.


talk is cheap, supply exceeds demand

View solution in original post

4 Replies
Gysbert_Wassenaar

If you simply want a count of the rows in a chart object you can use something like this:

Count({Alt_State_Here} aggr(1, Dim1, Dim2, Dim3 etc))

Replace Alt_State_Here with the name of your alternate state and Dim1, Dim2, Dim3 etc with the dimensions of your chart.


talk is cheap, supply exceeds demand

View solution in original post

Not applicable
Author

Ok, so Aggr has to be used. Question on aggr(1, Dim1, Dim2, Dim3 etc))  is the 1, placed there on purpose ?

Not applicable
Author

The 1 allows an output otherwise it returns 0. The current output should be 97 based on my selections, but is returning 830. Hmmmm. getting closer....

Not applicable
Author

Ok, So I took what I had and added the aggr() as you mentioned. It Works. Thank you so much Gysbert!

=Count({Alternate_A  <Project = $::Project, RevMonth = $::RevMonth, BacklogType = $::BacklogType, EndUserCat = $:: EndUserCat, WorkLocation = $:: WorkLocation, [BusSector] = $::[BusSector],

[ClientPartner] = $:: [ClientPartner], ProjType = $:: ProjType, RevType = $:: RevType, FlgCF = $:: FlgCF, Gate = $:: Gate, PWin =$:: PWin > } aggr(1, Project))