Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
raghavsurya
Partner - Specialist
Partner - Specialist

how to exclude a value in textbox

Hi All,

We currently have a situation wherein the graphs and charts in one of the tab does not have details for one of dimension value present in a list box. Hence we want to hide the value in the list box. Is there a way to do it.

Can anybody help me.

Regards,

Raghav

1 Solution

Accepted Solutions
tresesco
MVP
MVP

Hi,

Try: right Click on sheet -> New Sheet Object ->List Box . In general Tab you will find "field" where all list of field are there. DON'T select "year" from there. SELECT <Expression>(you will find in the list). Write the formula over there. Done!

Formula: If (Year<>2011,Year)

regards, tresesco

View solution in original post

12 Replies
jonathandienst
Partner - Champion III
Partner - Champion III

Raghav

I am assuming that you have one or more blank/null values in the list box and you want to hide these.

If so, then select <expression> as the field in the list box, and enter something like this as the expression:

if(len(field)>0, field)

Hope that helps

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
tresesco
MVP
MVP

Hi raghav,

Go to <expression> in the list box option and write the expression as:

If([Your Filed]<>'Your Particlular Value which you want to hide',[Your Field])

regards, tresesco

raghavsurya
Partner - Specialist
Partner - Specialist
Author

Hi Jonathan,

To be elaborate, I want to hide the Year 2011 in the Year list box. The current sheet has graphs for actual values and hence no graph will display if Year 2011 is selected.

Can u pls suggest how to do it

Thanks and Regards,

Raghav

raghavsurya
Partner - Specialist
Partner - Specialist
Author

Hi Tresesco,

I want to hide the year 2011 in list box called 'Year'. Can you please suggest where can I find the expression in List box properties.

Thanks and Regards,

Raghav

syed_muzammil
Partner - Creator II
Partner - Creator II

Hi,

At the script level you can use the Where exists() function in your Year Table to remove those years which donot have data.

Eg:

Where exists(MainDate,Date) where MainDate is from the table you are linking your Year Table to.

I hope you understood this else check for Exisits() in the help maual of Qlikview

raghavsurya
Partner - Specialist
Partner - Specialist
Author

Hi Syed,

I need to exclude the Year 2011 from the list box for only one tab. But I need the year to be included in the list box for other sheets.

Regards,

Raghav

syed_muzammil
Partner - Creator II
Partner - Creator II

Hi,

Expression can be found in the Properties-->General-->Field list in the List Box. It will be the in the last row of the Filed selection drop down. There you can write your expression.

tresesco
MVP
MVP

Hi,

Try: right Click on sheet -> New Sheet Object ->List Box . In general Tab you will find "field" where all list of field are there. DON'T select "year" from there. SELECT <Expression>(you will find in the list). Write the formula over there. Done!

Formula: If (Year<>2011,Year)

regards, tresesco

jonathandienst
Partner - Champion III
Partner - Champion III

Raghav

Use this as the expression then to one of:

  • if(SalesYear <= 2010), SalesYear)
  • if(SalesYear <= Year(Max(SalesDate)), SalesYear)

Adjust the field names to suit your model. The second example will allow it to be determined dynamically.

Jonathan

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