Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

mattphillip
Contributor

Counting total number of rows despite selections

Hoping someone can help. I'm trying building a table to display total values of certain fields, but to do it in a way where the selections made won't change them.

Any ideas?

Many thanks!

8 Replies
MVP
MVP

Re: Counting total number of rows despite selections

You can use set identifier 1 to disregard all selections, like

Count( {1} FIELD)

Sum( {1} Amount)

Partner
Partner

Re: Counting total number of rows despite selections

Hi,

You can also try this,

For total row count:

Count({<Field=>} Field)

For total row count except common field:

Count(DISTINCT {<Field=>} Field)

mattphillip
Contributor

Re: Counting total number of rows despite selections

Thanks swuehl! I've now realised I might need to make it slightly more complicated. My dataset contains multiple years and what I would like to be able to do is count/sum the total rows/values for a particular year regardless of other selections made. Essentially, I'm looking to add a summary box for a particular year which won't change even if users make other selections within fields including the year field.

Is this possible?

Appreciated!

mattphillip
Contributor

Re: Counting total number of rows despite selections

Thanks Susovan, I've now realised I might need to make it slightly more complicated. My dataset contains multiple years and what I would like to be able to do is count/sum the total rows/values for a particular year regardless of other selections made. Essentially, I'm looking to add a summary box for a particular year which won't change even if users make other selections within fields including the year field.

Is this possible?

Appreciated!

MVP
MVP

Re: Counting total number of rows despite selections

Count( {1<Year = {2016} >} FIELD)

tyagishaila
Valued Contributor

Re: Counting total number of rows despite selections

Sum({<field=>}Amount)

Partner
Partner

Re: Counting total number of rows despite selections

You can also try this,

Sum({<Year={"$(=Max(Year))"}>}Value)

Not applicable

Re: Counting total number of rows despite selections

use this Sum({<Year={"$(=Max(Year))"}>}Value) or hardcode the value of year if looking for some other year and detach the text from all other selction.