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

Issue in YTD exp

Hi all,

When I try to give the following expression for the calculation of previous year ytd value, I get the result as 0.

can you please help me out in finding where the issue is?

thanks in advance

 

[Date] = {">=$(=YearStart(vCalendar)-1)"}*{"<$(=Date(MonthStart(vCalendar)-1,'DD/MM/YYYY'))"},

vcalendar is nothing but today()-1

Thanks & Regards,

Vidhya

5 Replies
Not applicable

Re: Issue in YTD exp

Hi, Please add the New field Called YEAR in the data model and use the below expression :

YEAR = {"$(=Yeay(Todat())-1)"}

Not applicable

Re: Issue in YTD exp

Hi,

I am comfortable with writing script for year, but I face few issues when I do the same for month.

I want to display Jan to Jul months of 2013 using variable, and it should automatically get changed to Jan to Aug 2013 when we are in September.

Hope I am clear.

Thanks and Regards,

Vidhya

MVP
MVP

Re: Issue in YTD exp

First glance says about few corrections, try like:

[Date] = {">=$(=YearStart(vCalendar)-1) <$(=MonthStart(vCalendar)-1)"},

Not applicable

Re: Issue in YTD exp

Hi,

Expression doesn't seem to work. I get 0 as the result

Thanks,

Sheela

MVP
MVP

Re: Issue in YTD exp

Could you post your sample qvw?

Community Browser