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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

COUNT SYNTAX

I have to count all the '1' numbers in the column 'RequestStatusID'


The column contains the numbers 1,21,922,etc......

I tried to use count but I had problems with the syntax....

Thanks

5 Replies
SunilChauhan
Champion II
Champion II

count({<RequestStatusID={'1'}>} RequestStatusID)


or

count(if(RequestStatusID=1, RequestStatusID))

Sunil Chauhan
alexandros17
Partner - Champion III
Partner - Champion III

Sum(If(RequestStatusID=1,1,0)

if you use count with the same expression even 0 values will be counted ...

let me know

rajeshvaswani77
Specialist III
Specialist III

Hi,

You can use Sum(If(RequestStatusID=1,1,0))

thanks,

Rajesh Vaswani

ashwanin
Specialist
Specialist

If you have 1 always in front

=Count({<RequestStatusID={'1*'}>} RequestStatusID)

If you have 1 anywhere in field (e.g 210)

use : =Count({<RequestStatusID={'*1*'}>} RequestStatusID)

Not applicable
Author

Thanks,

Now Each RequestID belongs to MeterID

I would like to count the RequestID per unique MeterID

How do I add DISTINCT to the second count you wrote me in your last answer?