Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Count value when field equals. Need Assistance

Need assistance with the following query

We have a table with a single column, field name "Answered" with values True and False

Answered

True

True

False

False

True

We need to count the True values ?  I've tried the following but it returns zero.. Not sure what I'm missing?

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

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Give this a shot:

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

It appears that Sense is evaluating the Answered field as a number instead of a string so in this case true=-1, false=0.

Hope this helps.

View solution in original post

17 Replies
alexandros17
Partner - Champion III
Partner - Champion III

It should work ... try to cancel all selections in the document ...

Could you send me your document?

Not applicable
Author

Will  send later tonight. Many thanks 

Sent from my Samsung Galaxy smartphone.

jagan
Luminary Alumni
Luminary Alumni

Hi,

This expression

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


Should work, check whether True has any blank space in it or try clearing the selections.


Regards,

Jagan.

Kushal_Chawda

try this

=Count(if(lower(trim(Answered))='trim',Answered))

Not applicable
Author

Sample.JPG

Not applicable
Author

We have some data from phone reporting, Date field, Call ID,  Answered (True or False)

I'm then using Qlik to count the total number of calls per day - which works fine count

Im using a table then adding my date field as my Dimension and using the measure  Count([Caller ID])

Which is fine, I then want to add a third column to the table to count the number of "True" answered calls

I attempted this by adding a third column to the table and selecting measure using the expression as below:

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

!

Not applicable
Author

I've attached the QVF file for reference - thanks

Not applicable
Author

I've attached my qvf file for reference see other response thanks for your assistance

robert_mika
Master III
Master III

Please see attached.

It is working