Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

paulyeo11
Not applicable

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

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

May be

YearStart(Today(), 1)

3 Replies
sunny_talwar
Not applicable

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

May be

YearStart(Today(), 1)

swuehl
Not applicable

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

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

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

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