Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Not applicable

How do we count the rows on a table when the data equals a particular value

I would like to count the rows that contain the value "True"

We have tried the following but it returns 0

Count({<Answered={'True'}>} Answered)

Example Data

Field Name=Answered

True

False

True

True

True

False

3 Replies
MVP
MVP

Re: How do we count the rows on a table when the data equals a particular value

Your expression seems correct (I just tried in a QlikView texbox and got 4)

ogster1974
Honored Contributor II

Re: How do we count the rows on a table when the data equals a particular value

try Count({<Answered={'-1'}>} Answered)

might be how your data is being loaded. true/false can be -1/0 to.

Regards

Andy

kumarnatarajan
Valued Contributor

Re: How do we count the rows on a table when the data equals a particular value

Hi vera,

When you are using this expression(Count({<Answered={'True'}>} Answered)) by "Answered" field dimension in table. It should return value 1 for each true dimension. If it's not return check your field format and value.

Using Below expression you can get the total True answered count in each row

Exp: Count(Total {<Answered={'True'}>} Answered)

Dim1AnsweredCount({<Answered={'True'}>} Answered)Count(Total {<Answered={'True'}>} Answered)
ST1True13
St2True13
St3False03
St4True13