Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
s10157754
Creator III
Creator III

Button to select duplicate dates in a single list box

Dear Qlikview Experts,

I have came across a weird situation that end up with duplicated dates in a single list box. The correct data can only be shown if duplicated dates are selected. So i have created a button and trying to auto select multiple dates from a single list box.

However, my current button can only select these 2 dates as shown:

wrong.PNG

And this is what i want to achieve by the click of a button:

Capture.PNG

I have attached my qvw to ease your reference. Any solutions would be greatly appreciated.

Thank you so much for your help in advance!

Best Regards 

4 Replies
dapostolopoylos
Creator III
Creator III

Change your Load script where you load the csv file like this

LOAD 
Date(DATE) as Date, 
TIME as Time, 
MESSAGE as Result,

right(FileDir(),3) as BCNo

FROM [$(FoundFile)]
(txt, codepage is 1252, embedded labels, delimiter is ',', msq);

It should work fine after reload.

 

 

Father/Husband/BI Developer
s10157754
Creator III
Creator III
Author

Dear Dapostolopoylos,

Sorry for the late reply. I have re-modify my loading script according to your suggestion, however, it seems to be not correct as well.

This is what i suppose to get by selecting 14th and 15th April:

1.PNG

But if using your code, there are some data looks like hiding away and never get selected:

2.PNG

I have attached both qvw file and raw file to ease your reference. Thank you so much for your help in advance!

Best Regards

QianNing

jonathandienst
Partner - Champion III
Partner - Champion III

Make sure that the dates are all loaded as numeric dates without timestamps. If they are text (left justified), then use Date#() during the load to convert to date value, and if they have timestamp values, use Floor() to remove the time portion. Also make sure that the format is consistent. Some of your dates are DMY, others are MDY (eg 04/09/19 and 04/09/2019), so they are not the same values.

Read up on Date, Date# in the online help

The complete syntax for interpreting and formatting a text date would be of the form

Date(Date#(myDate, <input date format>), <required display date format>) as ....

For a source date that is already numeric

Date(myDate, <required display date format>) as ...

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
s10157754
Creator III
Creator III
Author

Dear Jontydkpi,

All the raw files they are came with consistent date format which is 'MM/DD/YYYY' and I have already use Floor() function to remove those raw files that came with timestamp. However i was still unable to get the data for PBC202 after i selected both dates 14th & 15th April. 

Best Regards