4 Replies Latest reply: May 3, 2013 10:56 AM by Brian Garside

# 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.

• ###### Re: How to Calculate TOTAL Count of rows for an expression

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.

• ###### Re: How to Calculate TOTAL Count of rows for an expression

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

• ###### Re: How to Calculate TOTAL Count of rows for an expression

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....

• ###### Re: How to Calculate TOTAL Count of rows for an expression

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))