Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Not applicable

Problem to get Last Year Same day value

Hello Everyone,

CY_LY.jpg

I have DATE( current Year) , PYDate indicates Last year date of the current year Day

For example : current date is sep 17th - Wednesday, week3,

                       The PY date is showing Sep 18th-2013 - Wednesday, week 3, the logic is like this.

I need to get previous year values, i tried using by create a key at script level,, but it is not working, it is not giving expected results

Can anybody tell how to to get previous year values based on the Date and PYDate association.

Thanks

Tags (1)
3 Replies
konstantin
Contributor III

Re: Problem to get Last Year Same day value

can you post your qvw file here:

I assume you need something like:

Today() as Date

AddMonths(Today(), -12) as PYDate

MVP
MVP

Re: Problem to get Last Year Same day value

You have to create additional fields in the script(if not already there) that gives you WeekNo (May be using LunarWeek idea) and WeekDay.

Or, have a look here :http://community.qlik.com/blogs/qlikviewdesignblog/2014/03/03/ytd for another idea.

vikasmahajan
Honored Contributor III

Re: Problem to get Last Year Same day value

Sending you Like wise qvw file please checked if this could help you.

Vikas@

Community Browser