Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Matty
Contributor II
Contributor II

Automatically set date picker to date and load data on open sheet

Hi Community, 

I am sure this has worked for me before, but now it doesn't for some reason???

I have a date picker and I need it to default to current date and the pivot tables in the model to load the data for the current date only.

I have set a trigger on ActivateSheet and I am using the External to set a variable (vFromDate) that the date picker uses to Today, (I also tried =Date(today())). Here is the thing, the Date Picker is setting the date correctly, and in the correct format and if I expand it, I can clearly see that todays date is selected, but the tables in the sheet is cleared (no data showing). However, if I manually select the date (same as is already selected) the data appears like magic. It's like it has set the date correctly, but is not refreshing to actually load the selected data in the tables. 

Just to so there is no confusion. I am not trying to reload the data in the sheet, I just want the selected date (and data) when you open the sheet to be today's date by default. The date picker is setting the date, but not executing the selection until I manually press again on the date that is already selected. Any ideas? 

QlikView #datepicker

Labels (1)
3 Replies
Anil_Babu_Samineni

@Matty Please check here, Edit Sheet.

Anil_Babu_Samineni_0-1706680019706.png

Anil_Babu_Samineni_1-1706680057640.png

 

 

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
Matty
Contributor II
Contributor II
Author

I am not sure where this is. I am using QlikView ver 11.20. 

I can't find this setting, so I assume you are using QlikSense or something else. As I mentioned, the correct date value is selected in the Datepicker, it just does not update the data. Instead it is cleared. I need to select the same value in the Datepicker manually for the data to show in the tables.
In the expressions in the tables I use a syntax similar to this to present the data.

 

=Sum(if( Date($(vFromDate), 'YYYYMMDD') = date#(LoadDate,'dd/MM/yyyy'), Damaged,0))

Matty
Contributor II
Contributor II
Author

Ok, I will answer my own question here.

You will need to set the variable used in date picker to

=Num(Today())

Then the sheet will reload automatically onActivate.