Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to count occurrences of something in SQL load?

So I have:

SQL SELECT * FROM Users;

..and I know the Users has a column Active where each record contains a string that is either 'true' or 'false' .

How do I get the number of loaded occurrences of the string 'true' in that column, so that I can show the full count regardless of how the user makes selections etc. when that data is displayed on a Table Box?

A Text Object with something like =Count(if(Active='true', 1)) won't do because it changes based on selections.

2 Replies
Anonymous
Not applicable
Author

well.. you can always ignore the selections like this... =Count({1} if(Active='true', 1))

MayilVahanan

hi

you can use count({1}if(Active ='true',1))

or in script seet flag like or separate the active value is true

load * ,if(Active = `true`,Actvie) As actvietrue;

select *  Frrom tablename;

hope it helps

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.