Qlik Community

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

cancel
Showing results for 
Search instead for 
Did you mean: 
amirjabbar1900
Contributor III
Contributor III

trying to measure 2 conditions

hi,

count({<[Year]={$(=max([Year])-1)}>}EMP_STATUS='A')

in the above statement i m trying to count emp_status value A for perivous year .

is it correct ?

1 Solution

Accepted Solutions
kaushiknsolanki

no,

Correct is as below.

count({<[Year]={"$(=max([Year])-1)"},EMP_STATUS={"A"}>}EMP_STATUS)


Regards,

Kaushik Solanki

Regards,
Kaushik
If reply is satisfactory, please "Like" the post.
If reply is solution, please mark as "Correct".

View solution in original post

12 Replies
kaushiknsolanki

no,

Correct is as below.

count({<[Year]={"$(=max([Year])-1)"},EMP_STATUS={"A"}>}EMP_STATUS)


Regards,

Kaushik Solanki

Regards,
Kaushik
If reply is satisfactory, please "Like" the post.
If reply is solution, please mark as "Correct".
OmarBenSalem
Partner
Partner

I don't thinkk that would be ok, I would do it as follow:

count({<EMP_STATUS={'A'},[Year]={$(=max([Year])-1)}>}EMP_STATUS)

amirjabbar1900
Contributor III
Contributor III
Author

what if we want to calculate for the same year

amirjabbar1900
Contributor III
Contributor III
Author

what if we want to calculate for the same year

kaushiknsolanki

It will be

count({<EMP_STATUS={'A'},[Year]={$(=max([Year]))}>}EMP_STATUS)

Regards,
Kaushik
If reply is satisfactory, please "Like" the post.
If reply is solution, please mark as "Correct".
agigliotti
Partner
Partner

it should looks like below:

count( {< EMP_STATUS = {'A'}, [Year] = {"$(=Max([Year]))"}>} EMP_STATUS )

amirjabbar1900
Contributor III
Contributor III
Author

can i get tutorial/training guide for this ?

amirjabbar1900
Contributor III
Contributor III
Author

can i get tutorial/training guide for this ?

devarasu07
Master II
Master II

HI,

PFA,