Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
rgvavihs
Valued Contributor

Mtd,Ytd

Hi All,

I am working on ytd,mtd calcuation in script level.

Below is my script.

I am getting the day values which are correct .But my ytd ,mtd are wrong values.Please correct if my formula is wrong.

Load *, 'YTD' as TimeGranule

Resident Cal where Date >=YearStart(TempDate) and Date<=TempDate;

Load *, 'MTD' as TimeGranule

Resident Cal where Date >= MonthStart(TempDate) and Date <= TempDate;

Load * , 'Day' as TimeGranule

Resident Cal

where Date=TempDate;

Thanks

1 Reply
MVP
MVP

Re: Mtd,Ytd

Have a look here:

Relative Calendar Fields

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Community Browser