Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Counting specific values in a field and displaying in a text box

I am trying to included data counts in a sentence form.  My first sentence worked correctly:

='# of claims worked: '&count([Outcome]) -> Displayed as "# claims worked: 39", because there are 39 total claims in the data set.

I am trying to use the same type of format to count a specific type of outcome and it is not working. For example, there are 17 claims listed as "Both" in the system.  I would like the sentence output to read '# claims worked: 17"

I tried '# of claims worked: '&count([Outcome]='Both') - didn't work

I attempted to use the conditional formatting tab to specify [Outcome]='Both' with the original formula ='# of claims worked: '&count([Outcome])

What formula and format should be used when a user wants to return a count for a specific value within a field within a text box sentence?

1 Solution

Accepted Solutions
settu_periasamy
Master III
Master III

Hi,

is the 'BOTH' value in OUTCOME field?

then you need use OUTCOME field into set expression. (Already Jerry Mentioned)

'# of claims worked: '&count({<[Outcome]={'Both'}>}[Outcome])

View solution in original post

4 Replies
jwjackso
Specialist III
Specialist III

Use the field that identifies the record as 'Both', for example if the field name is RecType,

'# of claims worked: '&count({<RecType={'Both'}>}[Outcome])

Anonymous
Not applicable
Author

Thank you for the response. It did not work.  I have the full number of claims showing.

jwjackso
Specialist III
Specialist III

Can you post the expression you are using and the results you need?

settu_periasamy
Master III
Master III

Hi,

is the 'BOTH' value in OUTCOME field?

then you need use OUTCOME field into set expression. (Already Jerry Mentioned)

'# of claims worked: '&count({<[Outcome]={'Both'}>}[Outcome])