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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Distinct data in listbox

ScreenShot.JPG123.JPG

i have Capturedatetime feild having one day data with diffrent times.

then i need to display date only in one listbox  and display distinct times in other list box

in the date list box i need to show the distinct date...but i get all dates repeated but time showing is fine in other list box

here how to show the distinct date in firs list box..

Is it possible.??

If possible ,

plz help me on this....

Many Thanks

Ravi

1 Solution

Accepted Solutions
Not applicable
Author

Hi,

Use this function to return just date

Subfiled()

Ex.:

Test:

LOAD

Date(vDate, 'DD/MM/YYYY') AS REPEAT_DATE,

SubField(vDate, ' ', 1) AS ONLY_DATE,

INLINE [

vDate

11/05/2011 12:30:00

11/05/2011 12:40:00

11/05/2011 12:50:00 ];

View solution in original post

19 Replies
Not applicable
Author

Hi,

Use this function to return just date

Subfiled()

Ex.:

Test:

LOAD

Date(vDate, 'DD/MM/YYYY') AS REPEAT_DATE,

SubField(vDate, ' ', 1) AS ONLY_DATE,

INLINE [

vDate

11/05/2011 12:30:00

11/05/2011 12:40:00

11/05/2011 12:50:00 ];

Not applicable
Author

helo i need to maintain the relation ship b/w two lsit boxes...

is it possible with ur solution.

i mean when i am selecting the date in list box .default time would be selected in time list box

Thanks a lot for ur reply.

erichshiino
Partner - Master
Partner - Master

Hi,

If the code works for you,just need to add the original field:

LOAD

Date(vDate, 'DD/MM/YYYY') AS REPEAT_DATE,

SubField(vDate, ' ', 1) AS ONLY_DATE,

vDate

INLINE [

vDate

11/05/2011 12:30:00

11/05/2011 12:40:00

11/05/2011 12:50:00 ];

Not applicable
Author

ListBoxes in QlikView display only distinct values.

You notice that your application dispays many times "17/04/2011". Why ?

Because "17/04/2011" is just the format you asked the value to be displayed.

In reality, your listbox wants to show you :

- "17/04/2001 18:00:00" (--> displayed as "17/04/2011")

- "17/04/2001 18:02:00" (--> displayed as "17/04/2011")

- "17/04/2001 18:04:00" (--> displayed as "17/04/2011")

- ...

What you want is to display only the "date" part.

Look at the function "daystart", this will convert all your dates into "17/04/2001 00:00:00" and only 1 will be displayed in your list.

Example:

2011-05-11_152058.png

with the following settings

2011-05-11_152109.png

and the following data

;

will display

2011-05-11_152119.png

Whereas

2011-05-11_152131.png

with the expression

2011-05-11_152146.png

will display

2011-05-11_152155.png

Not applicable
Author

Hello,

Once again thank you for your replies.

I also need like this,

If i am selecting date from the StartDateListbox Then only one default time(any one) should be displayed .But what happening here is all the times regarding that date are displaying.

Is it possible,

please help me in that issue...

Many Thanks

Ravi

erichshiino
Partner - Master
Partner - Master

All of them are displayed because all of them are related through the original timestamp.

Do you want to show all the possible times or only one for each startdate? or to have a list of only default times?

Not applicable
Author

Hello Erich,

I want to do like this.

i want to provide that user has an option to select startdate seperately and starttime seperately.but what happening here is when date is slected all the times regarding that are selecteed automatically .

I think This will makes sense....

Is it possible..?

If possible , Let me know...

Thanks,

Not applicable
Author

In QlikView, if the values are "possible", it gives the same result as if the values are "selected".

If you really need to make a selection on the possible values, you can use a macro.

The only trigger you can use is "OnDeactivate" over the listbox and use the "Select Possible" action.

The user will have to make his selection then click on another objet.

Not applicable
Author

Hi Erich,

I want to show only one time for each startdate.

Is it possible?

If possible ,Let me know the solution.

Thanks...