Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

filter listbox of year to display all record of the current year and previous

Hi everyone,

I have a listbox that capture the years of hired date and displays it in horizontal view. So If you click on a year it will display all employee hired on that current year.  But I want it to display all the employees of the current hire and the previous the years.  Example is attached

Here's my code

Load

HireDate,

Year(HireDate) as Year

Month(HireDat) as Month

From

myexcel.xlsx


From here I created two list box , one for Year and the other for Month.

Thanks

2 Replies
Not applicable
Author

Hi,

I try to make a sample for your query..

What i understand from your question is that, when you select a year from the list box, you want to show the emp which are on that selected year and previous year of that selection.

for that purpose, i create two variables which are holding max(Year) and max(Year)-1. And by using the straight table, i write a set analysis to get the selected year and the previous year's list of employes.

I attach the document.

I hope, it will help you.

BR

Omer

Not applicable
Author

Hi Omer,

Sorry I took so long to reply,  your suggestion worked great. But is there a way to put the count forumal in the year list box?  Currently you have it on the employee/year straight table.

Reason being is that I got pleny of strainght tables and want to avoid duplicate forumal entry