Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

amirjabbar1900
New Contributor

count function on expression in measurement

Hello Everyone,

i have a question, i m need to count the status value ,

e.g status have values (new hire,fired ) ,Now have column status with the values of (new hire,fired ) i want to count the new hired and count fired , whats the function syntax ?

1 Solution

Accepted Solutions
vinieme12
Esteemed Contributor II

Re: count function on expression in measurement

Refer this post

Set Analysis: syntaxes, examples

Count of Hired

COUNT( {<Status={'new hire'}>} Status)

Count of fired

COUNT( {<Status={'fired'}>} Status)

9 Replies
vinieme12
Esteemed Contributor II

Re: count function on expression in measurement

Refer this post

Set Analysis: syntaxes, examples

Count of Hired

COUNT( {<Status={'new hire'}>} Status)

Count of fired

COUNT( {<Status={'fired'}>} Status)

amirjabbar1900
New Contributor

Re: count function on expression in measurement

Dear vineeth,

                     Gr8 that's works,but what if i want to to this function on same field ? like status field count both values on same column ? then how can i use it in measure expression ?

vinieme12
Esteemed Contributor II

Re: count function on expression in measurement

Create a straight table with Dimension as "Status"

and

Expression

      = Count(Status)

amirjabbar1900
New Contributor

Re: count function on expression in measurement

Department

Total

Employees

Employees

Left/ Fired

Employees

Hired

Admin

5

2

Production

5

7

Sales

0

3

Total

10

12

vinieme12
Esteemed Contributor II

Re: count function on expression in measurement

is this your source data? how should the expected output look like?

amirjabbar1900
New Contributor

Re: count function on expression in measurement

on emoloyee left/fired colum has 2 values ,(fired and resigned) need to count on same field with 2 values on same colum

amirjabbar1900
New Contributor

Re: count function on expression in measurement

hello vineeth,

                   dear i want to count 2 values of same colum ,

can i do like this ?

COUNT( {<STATUS={'Resigned'}>} STATUS) and COUNT( {<STATUS={'Weeded Out'}>} STATUS)

in same expression ?

vinieme12
Esteemed Contributor II

Re: count function on expression in measurement

try as below

COUNT( {<STATUS={'Resigned','Weeded Out'}>} STATUS)


Set Analysis: syntaxes, examples

amirjabbar1900
New Contributor

Re: count function on expression in measurement

thanks alot i works perfectly