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

Announcements
Qlik Connect 2026 Agenda Now Available: Explore Sessions
cancel
Showing results for 
Search instead for 
Did you mean: 
Aspiring_Developer
Specialist
Specialist

Date range picker- How to show maximum date qliksense

Hello All,

 

I have date field in which i have data only for the against first date of every month.

I want to use date range picker as a filter to the user for MonthYear.

First problem is i am unable to set the default date to maximum because when i do it it gives me this view:-

Aspiring_Developer_0-1594386011831.png

i am using this :-

Aspiring_Developer_1-1594386072530.png

 

Second problem is , since i have the data only for the first day of every month, if i use the calendar and user select any other date like 2 or 3 the values become zero as we don't have data against.

 

Please help me to understand how should i show the  calendar in the front end to the user.

 

Thanks in advance

Labels (1)
1 Reply
Gabriel
Partner - Specialist III
Partner - Specialist III

Hi,

 

I have tried with below data.

So in your Date Range Picker object, just the variable, $(vMaxDate) for Date Field default.

 

Sample:
Load * Inline
[
Site, Department, Date, Sales
A, 1, 01/01/2020, 429
A, 2, 01/02/2020, 958
A, 1, 01/03/2020, 1306
B, 2, 01/04/2020, 265
B, 1, 01/05/2020, 271
B, 3, 01/06/2020, 928
A, 1, 01/07/2020, 1898
B, 2, 01/08/2020, 1473
B, 1, 01/09/2020, 1760
B, 3, 01/10/2020, 678
C, 4, 01/11/2020, 1938
C, 1, 01/12/2020, 1718
C, 2, 01/13/2020, 937
C, 3, 01/14/2020, 1441
C, 1, 01/15/2020, 1999
C, 1, 01/16/2020, 432
D, 3, 10/07/2020,5698
];


NOCONCATENATE

tmpMaxDate:

LOAD
MAX(Date) AS MaxDate
RESIDENT Sample
ORDER BY Date DESC;

LET vMaxDate =DATE(FIELDVALUE('MaxDate',1),'DD/MM/YYYY');