Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Count "Text" in a Textbox

Hi,

I've got al Listbox

System | on_off

------------------------------

System3 | on

System1 | off

System33 | on

System78 | on

System133 | off

Now I want to crate a textbox where i can count all systems which are 'on'.

=count(on_off =1) & 'Systems are on'

Doesn't work, where is the problem??

Thanks

1 Solution

Accepted Solutions
swuehl
MVP
MVP

try either

= count(if (on_off = 'on', on_off)) & ' Systems are on'

or

=count({<on_off = {'on'}>} on_off) & ' Systems are on'

hope this helps,

Stefan

View solution in original post

2 Replies
Not applicable
Author

Try it this way

=count(if(on_off=1, system))

You could count either column.

swuehl
MVP
MVP

try either

= count(if (on_off = 'on', on_off)) & ' Systems are on'

or

=count({<on_off = {'on'}>} on_off) & ' Systems are on'

hope this helps,

Stefan