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

Showing the range of dates selected in current selection box

Hi

How do i display the complete format of a date field , when user selects a range of dates , for example a user selects 01/01/2010 - 02/01/2011, the current selection box display something like 30 of 2345 , instead can i display

01/01/2010 - 02/01/2011 , so that user know what date range has been selected.

Or, please suggest any other way to achive this other than showing in a calender box?

Thank you

1 Solution

Accepted Solutions
boorgura
Specialist
Specialist

Hey, this can be done in multiple ways by setting triggers or so..

for now - I just added conditions on the expressions.

Also, put some triggers on the variables so that To data is not less than From and the other way around.

Thanks,

Rocky

View solution in original post

12 Replies
isaiah82
Creator III
Creator III

I believe there is a way to change how many values can show up in the current selections box but can't remember exactly how. But I wouldn't recommend you show more than a few values. This may be a user setting. If the selection is entered in as a search string (e.g. >=01/01/2010<=02/01/2010) this will show up in the selections box. Alternatively, why not just have a list or multi box on the page that would show which values are selected. Or in a chart title or text box, do something like min(Date) & ' - ' & max(Date)?

-Isaiah

Anonymous
Not applicable
Author

min(getfieldselections ( date) ) & '-' & max(getfieldselections ( date) )

Anonymous
Not applicable
Author

The expression is not working for me when i use max and min , not sure ..why ...if i dont use max or min it works, i mean dispaly all values in date.

boorgura
Specialist
Specialist

you can simply use a text box with the expression:

=min(date) & ' - ' & max(date)

as the dates are already limited, it gives the right range.

only problem is, if some of the dates in between are omitted.

Anonymous
Not applicable
Author

Rocky Thank you ,

This works!

But i was thinking , its bit easier if a user can select a range of dates from 2 calender boxes , say FromDate and ToDate both refering to Date values

May be we can get this by creating variable right ? , I tried to create 2 variables FromDate and Todate, and not sure how to assign these 2 to calender boxes.

Could you please assist me in hetting this...

Thank you...

boorgura
Specialist
Specialist

create 2 variables.

as you said - FromDate and ToDate.

you can then have 2 calendar objects, each assigned with 1 variable.

make sure you give the min value and max values right - say for example

Min value is

=date('1/1/2010')

Max value is

=date('2/1/2011')

as you capture your variables, you can put triggers on the variables to control the Field.

or have your expression conditional based on the variables. (whichever is better applicable to the situation)

Anonymous
Not applicable
Author

So i have created 2 variable From and To, and in the calneder box i gave expressions,

From - Calender Box 1

Min Value

=Min (DATE) -- Expression

Max Value

=Max(DATE)-- Expression

To - Calender Box 2

Min Value

=Min (DATE)--Expression

Max Value

=Max(DATE)--- Expression

After this, I gave a calculated condition in bar chart as

=(if(DATE > From AND DATE < To, DATE, NULL()))

When i select values in the calender box, nothing changes in my , could you please see if anything worng in the above expressions

Anonymous
Not applicable
Author

Here is the sample data :

boorgura
Specialist
Specialist

Hey, this can be done in multiple ways by setting triggers or so..

for now - I just added conditions on the expressions.

Also, put some triggers on the variables so that To data is not less than From and the other way around.

Thanks,

Rocky