Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
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
maxgro
MVP
MVP

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

ogster1974
Partner - Master II
Partner - Master II

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

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

Regards

Andy

kumarnatarajan
Partner - Specialist
Partner - Specialist

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