Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
jmialoundama
Specialist
Specialist

Get value Date Range picker extension Qlik Sense

Hi, 

I would like to recover the value or values ​​selected by the user in the extenson Date Range Picker.

DATE RANGE PICKER.JPG

For example if the user selects only a date like 25/01/2020 I would like to retrieve this value in a text object.


If he selects a date range like for example from 25/01/2020 to 25/02/2020, I would like to retrieve the start date and end date in this same text field

Labels (2)
8 Replies
teiswamsler
Partner - Creator III
Partner - Creator III

Hi Jmialoundama

You can use expressions below, and then edit the text in the text object.

Minimum date:
Date(Min( [Datefield] ))

Maximum date:
Date(Max( [Datefield] ))

In text object
If( count( distinct [Datefield] ) = 1, only( [Datefield] ), Date(Min( [Datefield] )) & ' to ' & Date(Max( [Datefield] )) )

Br.
Teis

jmialoundama
Specialist
Specialist
Author

Thanks for your help.

If the user selects more than one date then the following message is displayed "Date_Min to Date_max", if the user selects no date then the following message is displayed "No date selected".

I put the following condition in a text object but it doesn't work

If( count( distinct [DATE FOR GL] ) > 1,'Du '& Date(Floor(Min( [DATE FOR GL] ))) & ' Au ' & Date(Floor(Max( [DATE FOR GL]))),'No Date for GL selected')

teiswamsler
Partner - Creator III
Partner - Creator III

hi

Try Changing
count( distinct [DATE FOR GL] ) > 1 to GetSelectedCount( [DATE FOR GL] ) > 1

Br.
Teis

jmialoundama
Specialist
Specialist
Author

I try this : 

If( GetSelectedCount([DATE FOR GL]) >0 ,'Du '& Date(Floor(Min( [DATE FOR GL] ))) & ' Au ' & Date(Floor(Max( [DATE FOR GL]))),'No Date for GL selected')

I selected this date range : 

Capture.JPG

 

 

 

 

 

 

 

 

 

But the message which display in my text object it's : NoDate for Gl selected , instead of  Du 01/01/2018 Au 07/01/2018

 

 

teiswamsler
Partner - Creator III
Partner - Creator III

Hi

It works at my end, have attached a sample.

Try making a text object with GetSelectedCount([DATE FOR GL]) to see what the calculation returns.

Br.
Teis

jmialoundama
Specialist
Specialist
Author

GetSelectedCount([DATE FOR GL]) return me 0

 

Capture.JPG

teiswamsler
Partner - Creator III
Partner - Creator III

Hi

Try changing [Date] to your date field name.

Br.
Teis

jmialoundama
Specialist
Specialist
Author

Yes my date filed name it's DATE FOR GL