Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
paulyeo11
Master
Master

How to make my QVW current date 1/1/2017 ?

HI All

Today is 28/12/2016 , I like to make QVW file think now is 1/1/2017. So that my SET expression can work.

Paul

1 Solution

Accepted Solutions
sunny_talwar

May be

YearStart(Today(), 1)

View solution in original post

3 Replies
sunny_talwar

May be

YearStart(Today(), 1)

swuehl
MVP
MVP

You could change the system time.

But I think it's better to replace any occurence of Today() with a variable vToday and set the variable to Today(1) at the beginning of your load script. For testing puporses, you can then change the variable to any date you like.

paulyeo11
Master
Master
Author

Hi Stefanl / Sunny

Thank you for your sharing.

In my QVW file , I have create a variable  :-

SET vToday=1; I have SET the variable to Today(1) , But may be this is not what i required,

Let me share with you my issue. Now I am develop sales chart for meeting on Feb 2017.

At first i create Chart 1 to display 2016 sales , it work fine . But after i add sales target for 2017. ( meaning now QV think that now is year = 2017 )

chart 1 cannot display and need user to click on year = 2016 then it can display the bar. In order to slove the issue , i create chart 2 now it display 2016 sales

Another solution i have is i can reduce the data by save only 2014 till 2016 and don't save 2017. it will work fine. But it will remove my sales target data for 2017 , which is not what i want.

Paul