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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Count expression for current & previous year in Text box

Hi there

I'm trying to use a text box to show the number of employees terminated in the current year and then another text box to show the number of employees terminated in the previous year.  I'm using the expressions below but it's coming up blank.  What am I doing wrong?

1 Solution

Accepted Solutions
sunny_talwar

Try this instead:

Count({<Term_Yr = {"$(=Max(Term_Yr))"}>} Emp_No)

Count({<Term_Yr = {"$(=Max(Term_Yr)-1)"}>} Emp_No)

View solution in original post

5 Replies
sunny_talwar

Try this instead:

Count({<Term_Yr = {"$(=Max(Term_Yr))"}>} Emp_No)

Count({<Term_Yr = {"$(=Max(Term_Yr)-1)"}>} Emp_No)

Kushal_Chawda

may be try with Total keyword

=Count(if(Term_Yr = max(Total Term_Yr ),Emp_No))

=Count(if(Term_Yr = max(Total Term_Yr )-1,Emp_No))

Not applicable
Author

Thanks Sunny

Worked perfectly.

I still don't know how to mark these posts as "Answered"???  I only have one option to select under my "Action" tab.

sunny_talwar

Not applicable
Author

Thanks Sunny

It all seems so obvious but I don't see any "Correct Answer" button anywhere??? And I've had this problem for months, no one seems to be able to help me.