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

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
er_mohit
Master II
Master II

Count Issue

hiiii..

i tried a lot but can't get right answer....

see my attached file

i want to count status='A' for a month

using variable no. of days ..

when i enter in variable =2 or more than 2 ,

then pivot chart show me the which employee havind status A for that month particularly.....

any help will be appreciated.....

1 Solution

Accepted Solutions
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

If you want the number of times that status A occurs x Days consecutively try Count({<status={'A'},count={$(Days)}>}status). If that's not what you need, you'll have to explain what you want.


talk is cheap, supply exceeds demand

View solution in original post

5 Replies
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

If you want the number of times that status A occurs x Days consecutively try Count({<status={'A'},count={$(Days)}>}status). If that's not what you need, you'll have to explain what you want.


talk is cheap, supply exceeds demand
er_mohit
Master II
Master II
Author

hiiii. thnx for your reply

Gysbert Wassenaar

take eg,

. actually i want that in my variable

Days when i write 2

then it gives me the detail of empid with corresponding date and status='A' that how much empid having status='A' twice time not more than two.....

like Days=2

in pivot chart it show

empid  date            status

101     1-1-2013          A

101     3-1-2013          A

102     5-1-2013          A

102     20-1-2013          A

and so on...........

CELAMBARASAN
Partner - Champion
Partner - Champion

Hi,

Check with this

Count({<empid={"=Count({<status={'A'}>}empid)=$(Days)"},status={'A'}>} empid)

Hope it helps

Celambarasan

er_mohit
Master II
Master II
Author

hiiii..

Celambarasan Adhimulam

thnks for your reply

i exactly want that if i put in my variable Days=2

then it shows in pivot chart how many employ are having ststus='A' continuosly with date

like in my pivot i want

empid            date            status

101               3-1-2013          A

101              4-1-2013          A

104               8-1-2013          A

104               9-1-2013          A

105               12-1-2013          A

105               13-1-2013          A

PLZZZZZ Help meeeeeeeeeeeee

sushil353
Master II
Master II

There is bit confusion in your problem discription.

do u want only 2 rows for an empid in pivot table in u enter 2 in input box.  similarly if u enter 3 in input box then max row should be 3 in pivot table.?

HTh

Sushil