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

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Linking table to input box

ReferenceCourseCodeCourseStartDateTrainingCentreMaxDelegatesTotalStudents
ESX08F0163FARZD23/1/2008Colchester206

I am wanting to limit my table so that it only shows values where the course start date has a course start year equal to the value that is in my input box (2012 as default). Can anyone shed any light on how I can build this condition into the table?

Essentially, if the current year is 2012 then the course start dates in the table should only be 2012, not all course start dates in the database. I am then going to build another table next to the one above but looks at the previous year and shows course start dates accordingly. I need the tables to read from the input box that has 'Current Year' and 'Previous Year' entry options.

Any help much appreciated.

1 Solution

Accepted Solutions
Not applicable
Author

Hi,

see the attached example.

Maybe it shows the direction you want to go.

Good Luck!

Rainer

View solution in original post

9 Replies
vijay_iitkgp
Partner - Specialist
Partner - Specialist

Hi,

Is there any specifiec reason to use input box ?? You can achiev this by using List box also. Create a list box for Course Start Year and trigeer it for bydeafult selection for latest year.

CELAMBARASAN
Partner - Champion
Partner - Champion

Hi,

     In expression you can use the variable to list the records based on the value in variable like

    For Current year:

     vCurrYear=2012

     Sum({<StartYear={$(vCurrYear)}>} TotalStudents)

     For Previous Year:

     vPrevYear=2011

     Sum({<StartYear={$(PrevYear)}>} TotalStudents)

Hope it helps

Celambarasan

Not applicable
Author

Hi Vijay,

I want to put two tables side by side, one that reads the current yera from the input box and one that reads from the previous year, therefore allowing me to compare yearly data sets.

Laurence

Not applicable
Author

In the load script, you can create the year from CourseStartDate:

if(IsNull(CourseStartYear), 'undefined', Year(CourseStartDate)) as Year;

Put the years into a list box to make selections.

Regards,

sebablum

Not applicable
Author

Course Start Year is in the load script, the difficulty i am having is that I want to see the course start date in it's current format, but i want two tables side by side that are programmed to look at the current year and previous year respectively. If i just made the selection via a list box the two tables would be presenting the same data.

Not applicable
Author

Anyone able to point me in the right direction?

Not applicable
Author

Hi,

see the attached example.

Maybe it shows the direction you want to go.

Good Luck!

Rainer

Not applicable
Author

Hi Rainer,

Thank you. This is exactly the direction i need to go.

Laurence

Not applicable
Author

Hi Laurence,

here are another way to solve your business problem.

Best wishes

Rainer