Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

calender dates

Hi

I want when i open the dashboard by default dates should be selected as follows:-

For current year

1st day of current month and current year - one day before system date ie 1st april 2018 till 23rd april 2018

for previous year

1st day of current  month and previous year - one day before system date ie 1st april 2017 till 23rd april 2017

How to implement same?

Paint1.png

1 Solution

Accepted Solutions
sudhirpkuwar
Partner - Creator II
Partner - Creator II

Use AddYears(today()-1,-1) for Previous Year

View solution in original post

28 Replies
YoussefBelloum
Champion
Champion

hi,

do you want to see the dates desribed above here ?

Paint1.png

what are the variables used and what are their expressions?

Anonymous
Not applicable
Author

yes I want same dates to be shown in calender

but i want this should be done using triggers

variables used area as follows:-

vstart for previous year starting date

vend for previous ear ending date

I have used triggers

vstart

monthstart(vstart)

but i want april 23,2017 to be displayed in calender. How to obtain that?

YoussefBelloum
Champion
Champion

What is the expressions used inside your variables: vstart and vend ?

Anonymous
Not applicable
Author

=num(count({ stateA<Sold_Date = {">=$(vstart)<=$(vend)"} >}DISTINCT SAPCode),'#,##0.0')

Anil_Babu_Samineni

Can you help us to consider as Field in selector and see that trigger working or not instead of Calendar?

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
Anonymous
Not applicable
Author

if in trigger I am using monthstart(vstart)-1 its not giving correct answer in text box

Anil_Babu_Samineni

What value you are getting in text box when you use =vstart? Or =$(vstart)

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
Anonymous
Not applicable
Author

vstart variable is functioning fine. I want vend variable to display 23rd april 2016

Anil_Babu_Samineni

Will you able to share sample?

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