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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

how do i default the entire dashboard to the current day

Hi,

how can i default the current month for the whole dashboard ?  I.e. on opening any sheet the user will see data for the current financial period but can change ?

Regards,

Laura

1 Solution

Accepted Solutions
MK_QSL
MVP
MVP

Settings >> Document Properties >> Trigger >>

Document Event Trigger

On Open >> Add Action >> Add >> Selection >> Select in Field >> OK

Field

YourDateField

Search String

=Date(Today())

EDIT : After Jonathan's Reply..

Search String

=Date(Max(YourDateField))

View solution in original post

6 Replies
jonathandienst
Partner - Champion III
Partner - Champion III

If you define a variable that returns the Max(Date) value, and you use that variable in the expressions, then when nothing is selected, the object will show data for the most recent period; but still allows the user to select alternate dates.

Define the variable in your load script like (assumes a date field called Date:

Set vMaxDate = =Max(Date);   // note the two = signs.

Then use this in a set expression like (assumes a 'dual' Month field, like the QV Month() function):

Sum(<{Month = {'$(=Month(vMaxDate))'}>} Amount)

Sum(<{Date = {'$(=vMaxDate)'}>} Amount)

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
MK_QSL
MVP
MVP

Settings >> Document Properties >> Trigger >>

Document Event Trigger

On Open >> Add Action >> Add >> Selection >> Select in Field >> OK

Field

YourDateField

Search String

=Date(Today())

EDIT : After Jonathan's Reply..

Search String

=Date(Max(YourDateField))

Anonymous
Not applicable
Author

Hi Manish,

this didn't end up working for me.  Where you wrote "YourDateField"  which field should i use as i have many to chose from?

MK_QSL
MVP
MVP

It should be your DateField which you are going to compare as today..

If you got reply on your question.. first try it and only after working, close the thread...

Anonymous
Not applicable
Author

shall do next time. thank-you.  i want to use the fiscal year and month though.  when i use month and put in todays date i get the wrong year.  so instead of:-

=Date(Today())


what is it for financial year?



MK_QSL
MVP
MVP

Provide sample application with dummy data... We can't answer without checking how is the format of your fields.

You can try two select in field

Year

Year(today())

Month

Month(Today())