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: 
AH
Creator III
Creator III

Removing one particular date from a list box using expression

Hi

Could anyone help me with this?

I have a list box with dates and i want to make a particular date null. In list box i want to make 1/1/11980 null but all other values stays as is.

Install.PNG.png

Thanks,

Shan

1 Solution

Accepted Solutions
rubenmarin1

Hi, you can use expression in listbox:

=Aggr(Only({1<[Install Date]={'>01/01/1990'}>} [Install Date]), [Install Date])

View solution in original post

10 Replies
datanibbler
Champion
Champion

Hi Shan,

I think listbox_elements are not particularly flexible in that respect. The best solution would probably be to just use a copy of that field that just has some text when there is this date in the original column.

Is that actually a date that is in your data? What is the reason you want to make that non_selectable (if there is a security issue, it might be a better alternative to use SECTION_ACCESS with a OMIT field?)

HTH

Best regards,

DataNibbler

AH
Creator III
Creator III
Author

DataNibbler,

Thanks for your response. Yes its a date in my data. I dont want to omit field,  i just want to omit a field value or just want to make it null.

Thanks,

Shan

rubenmarin1

Hi, you can use expression in listbox:

=Aggr(Only({1<[Install Date]={'>01/01/1990'}>} [Install Date]), [Install Date])

morgankejerhag
Partner - Creator III
Partner - Creator III

Just to clarify Rubens answer - when you create a list box you can scroll all the way to the bottom in the drop down where you select the field. There it says "expression"

AH
Creator III
Creator III
Author

Thanks Ruben!

That is doing the trick.

Shan

AH
Creator III
Creator III
Author

Is it possible to apply that in the text box?

Shan

AH
Creator III
Creator III
Author

I have one text box which is showing the Minimum install date and the expression for that is :

=Date(Min([Install Date]))

I was trying to apply your expression in this textbox expression. But its showing wrong expression.

Any help on that please!

Thanks,

Shan

rubenmarin1

That expression returns all dates >01/01/1990. What exactly you want to put in text box?

If it's an expression filtering dates >01/01/1990 you can use something like:

Sum({<[Install Date]={'>01/01/1990'}>} Sales)

or

Sum({<[Install Date]*={'>01/01/1990'}>} Sales)

If you want to show all the dates in textbox you need to use a concatenate funcion:

Concatenate(Aggr(Only({1<[Install Date]={'>01/01/1990'}>} [Install Date]), [Install Date]))

rubenmarin1

Ok, that should be:

=Date(Min({<[Install Date]={'>01/01/1990'}>} [Install Date])) --> Ignores selections in [Install Date]

or

=Date(Min({<[Install Date]*={'>01/01/1990'}>} [Install Date])) --> Selections in [Install Date] will count