Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

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
Champion III
Champion III

Refer this post

Set Analysis: syntaxes, examples

Count of Hired

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

Count of fired

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

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.

View solution in original post

9 Replies
vinieme12
Champion III
Champion III

Refer this post

Set Analysis: syntaxes, examples

Count of Hired

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

Count of fired

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

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
Anonymous
Not applicable
Author

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
Champion III
Champion III

Create a straight table with Dimension as "Status"

and

Expression

      = Count(Status)

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
Anonymous
Not applicable
Author

Department

Total

Employees

Employees

Left/ Fired

Employees

Hired

Admin

5

2

Production

5

7

Sales

0

3

Total

10

12

vinieme12
Champion III
Champion III

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

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
Anonymous
Not applicable
Author

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

Anonymous
Not applicable
Author

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
Champion III
Champion III

try as below

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


Set Analysis: syntaxes, examples

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
Anonymous
Not applicable
Author

thanks alot i works perfectly