9 Replies Latest reply: Aug 30, 2017 2:54 AM by amir jabbar

# 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 ?

• ###### 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)

• ###### 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 ?

• ###### Re: count function on expression in measurement

Create a straight table with Dimension as "Status"

and

Expression

= Count(Status)

• ###### Re: count function on expression in measurement
 Department TotalEmployees Employees Left/ Fired EmployeesHired Admin 5 2 Production 5 7 Sales 0 3 Total 10 12
• ###### Re: count function on expression in measurement

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

• ###### 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 ?

• ###### Re: count function on expression in measurement

try as below

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

Set Analysis: syntaxes, examples

• ###### Re: count function on expression in measurement

thanks alot i works perfectly

• ###### 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