Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Date Range in a list box

Hi,

I have a list box having date range as a field in it.

I want to show only the year for it.

Eg: For year Dec12-Nov13 it should come as 2013

                    Dec13-Nov14 it should come as 2014

and so on.


also in my list box one value is selected by defalut.

I want no values to be selected after doing clear all.


attached is the screenshot here.


how can i achieve the above 2 things.

Please help.

2 Replies
mdmukramali
Specialist III
Specialist III

Hi,

Can you share sample application

for one value selected you to have unchecked the below option.

286080.PNG

kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

You should use string function to do that.

To get 2013,2014 and so on, try below code.

Load *, '20'&Right(Field,2) as Year

From xyz;

Just replace the existing field with this new field.

Always one selected is a property of the List box which you can change from property window. Once you uncheck that option it will not select any value by default.

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!