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

Announcements
Qlik Connect 2026! Turn data into bold moves, April 13 -15: Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How do I show only those fields in list box whose data is present in qlikview?

I have a dimension YEAR which shows values from 2008 to 2015. However the data is available only from 2011-2015. How do I not display those extra values.?

15 Replies
tyagishaila
Specialist
Specialist

Hi Harshit,

I think your YEAR field is present in two different tables. Like,

Table1 has value 2008-2015

and Table2 has 2011-2015.

updateTable2 script,

YEAR,

YEAR as NewYear

From ......

and Show NewYear field in listbox.

Not applicable
Author

At backend I've the field YEAR whose values are 2008,09,10,11,12,13,14,15 but there are not any corresponding values for the years 2008,09,10,11.....so I have these values displayed in listbox but since I've no data for it...I don't want to display them....what should I do?

oknotsen
Master III
Master III

So the solution is to not load those years.

Without knowing the data model and the script in which you currently load the years I can't give you an exact solution on how to avoid those years being loaded.

May you live in interesting times!
tyagishaila
Specialist
Specialist

either use where condition in script,

or use if condition in list box.

jonathandienst
Partner - Champion III
Partner - Champion III

I assume the other dates are coming from your calendar. When you add the calendar, you could do it with like this:

Calendar:

Left Keep (FactTable)

LOAD Date As FactDate

     ...

FROM Calendar.qvd (qvd);

Modify the logic and field/table names to suit your requirement.

This will prevent the loading of calendar data for dates that do not exist in your fact table. And you don't need to mess around with set expressions or conditional list boxes...

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Not applicable
Author

Yup! It works! Thanks